Linux: use 'SYS_wait4' instead of 'SYS_waitpid'

'SYS_waitpid' does not exist on x86_64 Linux, but 'SYS_wait4' does.

Fixes #615.
This commit is contained in:
Christian Prochaska 2013-01-18 07:10:47 +01:00 committed by Norman Feske
parent 49206d7cf6
commit b4980e8b9f
3 changed files with 3 additions and 3 deletions

View File

@ -112,7 +112,7 @@ inline int lx_setgid(unsigned int gid)
*/
inline int lx_pollpid()
{
return lx_syscall(SYS_waitpid, -1 /* any PID */, (int *)0, 1 /* WNOHANG */);
return lx_syscall(SYS_wait4, -1 /* any PID */, (int *)0, 1 /* WNOHANG */, 0);
}

View File

@ -27,7 +27,7 @@ namespace Genode {
/*
* We hold all Platform_thread objects in a list in order to be able to
* reflect SIGCHLD as exception signals. When a SIGCHILD occurs, we
* determine the PID of the terminated child process via 'waitpid'. We use
* determine the PID of the terminated child process via 'wait4'. We use
* the list to find the 'Platform_thread' matching the TID, wherei, in
* turn, we find the exception handler's 'Signal_context_capability'.
*/

View File

@ -96,7 +96,7 @@ void Platform::wait_for_exit()
/*
* Reflect SIGCHLD as exception signal to the signal context of the CPU
* session of the process. Because multiple children could have been
* terminated, we iterate until 'pollpid' (wrapper around 'waitpid')
* terminated, we iterate until 'pollpid' (wrapper around 'wait4')
* returns -1.
*/
for (;;) {