From b4980e8b9f7dbec9352a349f4d68109aeaca9e43 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Fri, 18 Jan 2013 07:10:47 +0100 Subject: [PATCH] Linux: use 'SYS_wait4' instead of 'SYS_waitpid' 'SYS_waitpid' does not exist on x86_64 Linux, but 'SYS_wait4' does. Fixes #615. --- base-linux/src/core/include/core_linux_syscalls.h | 2 +- base-linux/src/core/include/platform_thread.h | 2 +- base-linux/src/core/platform.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base-linux/src/core/include/core_linux_syscalls.h b/base-linux/src/core/include/core_linux_syscalls.h index 7fe4f79f4..44ac7785a 100644 --- a/base-linux/src/core/include/core_linux_syscalls.h +++ b/base-linux/src/core/include/core_linux_syscalls.h @@ -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); } diff --git a/base-linux/src/core/include/platform_thread.h b/base-linux/src/core/include/platform_thread.h index d2e671ef8..7c2b4c5f2 100644 --- a/base-linux/src/core/include/platform_thread.h +++ b/base-linux/src/core/include/platform_thread.h @@ -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'. */ diff --git a/base-linux/src/core/platform.cc b/base-linux/src/core/platform.cc index 7029abe8d..a717c1767 100644 --- a/base-linux/src/core/platform.cc +++ b/base-linux/src/core/platform.cc @@ -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 (;;) {