mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
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:
parent
49206d7cf6
commit
b4980e8b9f
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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'.
|
||||
*/
|
||||
|
@ -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 (;;) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user