Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jan 2011 18:17:38 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r218100 - in head/sys: amd64/linux32 i386/linux
Message-ID:  <201101301817.p0UIHcs3080311@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dchagin
Date: Sun Jan 30 18:17:38 2011
New Revision: 218100
URL: http://svn.freebsd.org/changeset/base/218100

Log:
  The kern_wait() code already removes the SIGCHLD signal for the waited
  process. Removing other SIGCHLD signals is not needed and may cause
  problems.
  
  Pointed out by:	jilles
  
  MFC after:	1 Month.

Modified:
  head/sys/amd64/linux32/linux32_machdep.c
  head/sys/i386/linux/linux_machdep.c

Modified: head/sys/amd64/linux32/linux32_machdep.c
==============================================================================
--- head/sys/amd64/linux32/linux32_machdep.c	Sun Jan 30 16:21:25 2011	(r218099)
+++ head/sys/amd64/linux32/linux32_machdep.c	Sun Jan 30 18:17:38 2011	(r218100)
@@ -1283,7 +1283,6 @@ linux_wait4(struct thread *td, struct li
 	int error, options;
 	struct rusage ru, *rup;
 	struct l_rusage lru;
-	struct proc *p;
 
 #ifdef DEBUG
 	if (ldebug(wait4))
@@ -1304,12 +1303,6 @@ linux_wait4(struct thread *td, struct li
 	error = linux_common_wait(td, args->pid, args->status, options, rup);
 	if (error)
 		return (error);
-
-	p = td->td_proc;
-	PROC_LOCK(p);
-	sigqueue_delete(&p->p_sigqueue, SIGCHLD);
-	PROC_UNLOCK(p);
-
 	if (args->rusage != NULL) {
 		bsd_to_linux_rusage(rup, &lru);
 		error = copyout(&lru, args->rusage, sizeof(lru));

Modified: head/sys/i386/linux/linux_machdep.c
==============================================================================
--- head/sys/i386/linux/linux_machdep.c	Sun Jan 30 16:21:25 2011	(r218099)
+++ head/sys/i386/linux/linux_machdep.c	Sun Jan 30 18:17:38 2011	(r218100)
@@ -1318,7 +1318,6 @@ linux_wait4(struct thread *td, struct li
 {
 	int error, options;
 	struct rusage ru, *rup;
-	struct proc *p;
 
 #ifdef DEBUG
 	if (ldebug(wait4))
@@ -1339,12 +1338,6 @@ linux_wait4(struct thread *td, struct li
 	error = linux_common_wait(td, args->pid, args->status, options, rup);
 	if (error)
 		return (error);
-
-	p = td->td_proc;
-	PROC_LOCK(p);
-	sigqueue_delete(&p->p_sigqueue, SIGCHLD);
-	PROC_UNLOCK(p);
-
 	if (args->rusage != NULL)
 		error = copyout(&ru, args->rusage, sizeof(ru));
 



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