Date: Thu, 9 Jul 2009 12:39:25 +0200 (CEST) From: Thomas Quinot <thomas@cuivre.fr.eu.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/136611: security/swatch: leaves zombies behind Message-ID: <20090709103925.648945D3BC@melamine.cuivre.fr.eu.org> Resent-Message-ID: <200907091040.n69Ae1Ld009540@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090709103925.648945D3BC>