History

wait: allow sys_waitid() to accept __WNOTHREAD/__WCLONE/__WALL

I see no reason why waitid() can't support other linux-specific flags allowed in sys_wait4(). In particular this change can help if we reconsider the previous change ("wait/ptrace: assume __WALL if the child is traced") which adds the "automagical" __WALL for debugger.

Oleg Nesterov committed 10 years ago

Commit 91c4e8e1 parent bf959931 file · +2 −1Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/exit.c+2−1
@@ -1535,7 +1535,8 @@ SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *, · 1534 unmodified lines
15351535 enum pid_type type;
15361536 long ret;
15371537
1538− if (options & ~(WNOHANG|WNOWAIT|WEXITED|WSTOPPED|WCONTINUED))
1538+ if (options & ~(WNOHANG|WNOWAIT|WEXITED|WSTOPPED|WCONTINUED|
1539+ __WNOTHREAD|__WCLONE|__WALL))
15391540 return -EINVAL;
15401541 if (!(options & (WEXITED|WSTOPPED|WCONTINUED)))
15411542 return -EINVAL;