Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Implement WIFCONTINUED using the linux value instead of ...



details:   https://anonhg.NetBSD.org/src/rev/38f06781d2f5
branches:  trunk
changeset: 814736:38f06781d2f5
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Apr 06 03:51:26 2016 +0000

description:
Implement WIFCONTINUED using the linux value instead of the FreeBSD one...

diffstat:

 sys/kern/kern_exit.c |  8 ++++----
 sys/sys/wait.h       |  5 ++++-
 2 files changed, 8 insertions(+), 5 deletions(-)

diffs (63 lines):

diff -r 809f1e96451a -r 38f06781d2f5 sys/kern/kern_exit.c
--- a/sys/kern/kern_exit.c      Wed Apr 06 03:50:03 2016 +0000
+++ b/sys/kern/kern_exit.c      Wed Apr 06 03:51:26 2016 +0000
@@ -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 @@
                }
        } 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 @@
                                break;
                        }
                }
-               /* XXX: WCONTINUED? */
 
                if (child != NULL || error != 0 ||
                    ((options & WNOHANG) != 0 && dead == NULL)) {
diff -r 809f1e96451a -r 38f06781d2f5 sys/sys/wait.h
--- a/sys/sys/wait.h    Wed Apr 06 03:50:03 2016 +0000
+++ b/sys/sys/wait.h    Wed Apr 06 03:51:26 2016 +0000
@@ -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
 
 /*



Home | Main Index | Thread Index | Old Index