[Midnightbsd-cvs] src [8739] trunk/sys/kern/kern_exit.c: align with FreeBSD 9.2

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Sep 25 20:50:27 EDT 2016


Revision: 8739
          http://svnweb.midnightbsd.org/src/?rev=8739
Author:   laffer1
Date:     2016-09-25 20:50:27 -0400 (Sun, 25 Sep 2016)
Log Message:
-----------
align with FreeBSD 9.2

Modified Paths:
--------------
    trunk/sys/kern/kern_exit.c

Modified: trunk/sys/kern/kern_exit.c
===================================================================
--- trunk/sys/kern/kern_exit.c	2016-09-26 00:24:14 UTC (rev 8738)
+++ trunk/sys/kern/kern_exit.c	2016-09-26 00:50:27 UTC (rev 8739)
@@ -1024,22 +1024,27 @@
 	id_t id;
 	int ret;
 
+	/*
+	 * Translate the special pid values into the (idtype, pid)
+	 * pair for kern_wait6.  The WAIT_MYPGRP case is handled by
+	 * kern_wait6() on its own.
+	 */
 	if (pid == WAIT_ANY) {
 		idtype = P_ALL;
 		id = 0;
-	}
-	else if (pid <= 0) {
+	} else if (pid < 0) {
 		idtype = P_PGID;
 		id = (id_t)-pid;
-	}
-	else {
+	} else {
 		idtype = P_PID;
 		id = (id_t)pid;
 	}
+
 	if (rusage != NULL)
 		wrup = &wru;
 	else
 		wrup = NULL;
+
 	/*
 	 *  For backward compatibility we implicitly add flags WEXITED
 	 *  and WTRAPPED here.



More information about the Midnightbsd-cvs mailing list