Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Aug 2015 20:08:54 +0000 (UTC)
From:      Mariusz Zaborski <oshogbo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r286698 - head/sys/kern
Message-ID:  <201508122008.t7CK8sjG009888@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: oshogbo
Date: Wed Aug 12 20:08:54 2015
New Revision: 286698
URL: https://svnweb.freebsd.org/changeset/base/286698

Log:
  When the wait*(2) syscalls wait for any process (P_ALL), they should
  ignore processes created with the pdfork(2) syscall.
  
  PR:		201054
  Approved by:	pjd (mentor)
  Discussed with:	emaste, rwatson

Modified:
  head/sys/kern/kern_exit.c

Modified: head/sys/kern/kern_exit.c
==============================================================================
--- head/sys/kern/kern_exit.c	Wed Aug 12 19:48:49 2015	(r286697)
+++ head/sys/kern/kern_exit.c	Wed Aug 12 20:08:54 2015	(r286698)
@@ -981,6 +981,10 @@ proc_to_reap(struct thread *td, struct p
 
 	switch (idtype) {
 	case P_ALL:
+		if (p->p_procdesc != NULL) {
+			PROC_UNLOCK(p);
+			return (0);
+		}
 		break;
 	case P_PID:
 		if (p->p_pid != (pid_t)id) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508122008.t7CK8sjG009888>