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

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
1535 enum pid_type type;1535 enum pid_type type;
1536 long ret;1536 long ret;
1537 1537
1538 if (options & ~(WNOHANG|WNOWAIT|WEXITED|WSTOPPED|WCONTINUED))1538 if (options & ~(WNOHANG|WNOWAIT|WEXITED|WSTOPPED|WCONTINUED|
1539 __WNOTHREAD|__WCLONE|__WALL))
1539 return -EINVAL;1540 return -EINVAL;
1540 if (!(options & (WEXITED|WSTOPPED|WCONTINUED)))1541 if (!(options & (WEXITED|WSTOPPED|WCONTINUED)))
1541 return -EINVAL;1542 return -EINVAL;