mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 795480 - Make b2g app ensure that it's the process group controller. r=cjones
This commit is contained in:
parent
1feb80b867
commit
4b576069dc
@ -12,6 +12,7 @@
|
||||
#elif defined(XP_UNIX)
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
@ -169,6 +170,15 @@ int main(int argc, char* argv[])
|
||||
|
||||
strcpy(++lastSlash, XPCOM_DLL);
|
||||
|
||||
#if defined(XP_UNIX)
|
||||
// If the b2g app is launched from adb shell, then the shell will wind
|
||||
// up being the process group controller. This means that we can't send
|
||||
// signals to the process group (useful for profiling).
|
||||
// We ignore the return value since setsid() fails if we're already the
|
||||
// process group controller (the normal situation).
|
||||
(void)setsid();
|
||||
#endif
|
||||
|
||||
int gotCounters;
|
||||
#if defined(XP_UNIX)
|
||||
struct rusage initialRUsage;
|
||||
|
Loading…
Reference in New Issue
Block a user