work around stupid linux bug
This commit is contained in:
parent
74fc94d47e
commit
8f4871fd2e
1 changed files with 8 additions and 0 deletions
|
|
@ -582,6 +582,14 @@ main(int argc, char **argv)
|
||||||
_threadcreate(p, threadmainstart, nil, mainstacksize);
|
_threadcreate(p, threadmainstart, nil, mainstacksize);
|
||||||
procscheduler(p);
|
procscheduler(p);
|
||||||
_threaddaemonize();
|
_threaddaemonize();
|
||||||
|
/*
|
||||||
|
* On Linux 2.6, if the main thread exits then the others
|
||||||
|
* keep running but the process shows up as a zombie in ps
|
||||||
|
* and is not attachable with ptrace. We'll just sit around
|
||||||
|
* instead of exiting.
|
||||||
|
*/
|
||||||
|
for(;;)
|
||||||
|
sleep(1000);
|
||||||
_threadpexit();
|
_threadpexit();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue