ports/136611: security/swatch: leaves zombies behind

Thomas Quinot thomas at cuivre.fr.eu.org
Thu Jul 9 10:40:02 UTC 2009


>Number:         136611
>Category:       ports
>Synopsis:       security/swatch: leaves zombies behind
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 09 10:40:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Thomas Quinot
>Release:        FreeBSD 7.1-STABLE i386
>Organization:
>Environment:
System: FreeBSD melamine.cuivre.fr.eu.org 7.1-STABLE FreeBSD 7.1-STABLE #1: Mon Feb 16 22:23:36 CET 2009 root at melamine.cuivre.fr.eu.org:/space/build/obj/space/build/src/RELENG_7/sys/GENERIC i386


	
>Description:
	When a Swatch rule has an "exec" action, child processes are not
	correctly cleaned up.
>How-To-Repeat:
	Define an "exec" action and watch for zombie processes
>Fix:

	The following quick and dirty patches adds a missing (blocking) waitpid
	call, it's fine if the action executes in bounded time, if not it needs
	to be refined.

--- Actions.pm.orig	Tue May  2 23:17:42 2006
+++ Actions.pm	Thu Jul  9 12:20:27 2009
@@ -96,7 +96,7 @@
 
  EXECFORK: {
     if ($exec_pid = fork) {
-      waitpid(-1, WNOHANG);
+      waitpid($exec_pid, 0);
       return 0;
     } elsif (defined $exec_pid) {
       exec($command);
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list