Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1358368

[PATCH 2/2] wait: allow sys_waitid() to accept __WNOTHREAD/__WCLONE/__WALL

From Oleg Nesterov <oleg@redhat.com>
Newsgroups linux.kernel
Subject [PATCH 2/2] wait: allow sys_waitid() to accept __WNOTHREAD/__WCLONE/__WALL
Date 2016-03-16 00:40 +0100
Message-ID <rd6Je-EH-63@gated-at.bofh.it> (permalink)
References <rd6Jb-EH-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
which adds the "automagical" __WALL for debugger.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
 kernel/exit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/exit.c b/kernel/exit.c
index c112abb..9db1f4a 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1533,7 +1533,8 @@ SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *,
 	enum pid_type type;
 	long ret;
 
-	if (options & ~(WNOHANG|WNOWAIT|WEXITED|WSTOPPED|WCONTINUED))
+	if (options & ~(WNOHANG|WNOWAIT|WEXITED|WSTOPPED|WCONTINUED|
+			__WNOTHREAD|__WCLONE|__WALL))
 		return -EINVAL;
 	if (!(options & (WEXITED|WSTOPPED|WCONTINUED)))
 		return -EINVAL;
-- 
2.5.0

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] wait/ptrace: assume __WALL if the child is traced Oleg Nesterov <oleg@redhat.com> - 2016-03-16 00:40 +0100
  [PATCH 1/2] wait/ptrace: assume __WALL if the child is traced Oleg Nesterov <oleg@redhat.com> - 2016-03-16 00:40 +0100
  [PATCH 2/2] wait: allow sys_waitid() to accept  __WNOTHREAD/__WCLONE/__WALL Oleg Nesterov <oleg@redhat.com> - 2016-03-16 00:40 +0100

csiph-web