Module Name: src Committed By: christos Date: Wed Apr 6 03:51:26 UTC 2016
Modified Files: src/sys/kern: kern_exit.c src/sys/sys: wait.h Log Message: Implement WIFCONTINUED using the linux value instead of the FreeBSD one... To generate a diff of this commit: cvs rdiff -u -r1.255 -r1.256 src/sys/kern/kern_exit.c cvs rdiff -u -r1.29 -r1.30 src/sys/sys/wait.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/kern_exit.c diff -u src/sys/kern/kern_exit.c:1.255 src/sys/kern/kern_exit.c:1.256 --- src/sys/kern/kern_exit.c:1.255 Tue Apr 5 10:07:31 2016 +++ src/sys/kern/kern_exit.c Tue Apr 5 23:51:26 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exit.c,v 1.255 2016/04/05 14:07:31 christos Exp $ */ +/* $NetBSD: kern_exit.c,v 1.256 2016/04/06 03:51:26 christos Exp $ */ /*- * Copyright (c) 1998, 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.255 2016/04/05 14:07:31 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.256 2016/04/06 03:51:26 christos Exp $"); #include "opt_ktrace.h" #include "opt_dtrace.h" @@ -685,7 +685,8 @@ do_sys_waitid(idtype_t idtype, id_t id, } } else { /* Child state must have been SSTOP. */ - *status = W_STOPCODE(child->p_xsig); + *status = child->p_xsig == SIGCONT ? W_CONTCODE() : + W_STOPCODE(child->p_xsig); mutex_exit(proc_lock); } return 0; @@ -1032,7 +1033,6 @@ find_stopped_child(struct proc *parent, break; } } - /* XXX: WCONTINUED? */ if (child != NULL || error != 0 || ((options & WNOHANG) != 0 && dead == NULL)) { Index: src/sys/sys/wait.h diff -u src/sys/sys/wait.h:1.29 src/sys/sys/wait.h:1.30 --- src/sys/sys/wait.h:1.29 Sat Apr 2 17:09:43 2016 +++ src/sys/sys/wait.h Tue Apr 5 23:51:26 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: wait.h,v 1.29 2016/04/02 21:09:43 christos Exp $ */ +/* $NetBSD: wait.h,v 1.30 2016/04/06 03:51:26 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993, 1994 @@ -57,7 +57,9 @@ #define _WSTATUS(x) (_W_INT(x) & 0177) #define _WSTOPPED 0177 /* _WSTATUS if process is stopped */ +#define _WCONTINUED 0xffffU #define WIFSTOPPED(x) (_WSTATUS(x) == _WSTOPPED) +#define WIFCONTINUED(x) (_W_INT(x) == _WCONTINUED) #define WSTOPSIG(x) ((int)(((unsigned int)_W_INT(x)) >> 8) & 0xff) #define WIFSIGNALED(x) (_WSTATUS(x) != _WSTOPPED && _WSTATUS(x) != 0) #define WTERMSIG(x) (_WSTATUS(x)) @@ -69,6 +71,7 @@ #define W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) #define W_STOPCODE(sig) ((sig) << 8 | _WSTOPPED) +#define W_CONTCODE() (_WCONTINUED) #endif /*