From unknown Sat Jun 21 05:18:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13166: =?UTF-8?Q?=E2=80=98system*=E2=80=99?= may leave dangling processes Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 12 Dec 2012 23:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13166 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 13166@debbugs.gnu.org X-Debbugs-Original-To: bug-guile@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.135535417523945 (code B ref -1); Wed, 12 Dec 2012 23:17:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Dec 2012 23:16:15 +0000 Received: from localhost ([127.0.0.1]:39681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TivXD-0006EA-HJ for submit@debbugs.gnu.org; Wed, 12 Dec 2012 18:16:15 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39231) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TivXA-0006E2-M7 for submit@debbugs.gnu.org; Wed, 12 Dec 2012 18:16:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TivWG-0001qx-QU for submit@debbugs.gnu.org; Wed, 12 Dec 2012 18:15:23 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-106.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:44515) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TivWG-0001qb-No for submit@debbugs.gnu.org; Wed, 12 Dec 2012 18:15:16 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TivVc-00039U-54 for bug-guile@gnu.org; Wed, 12 Dec 2012 18:14:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TivVb-00016x-5E for bug-guile@gnu.org; Wed, 12 Dec 2012 18:14:36 -0500 Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]:25511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TivVa-00016n-Uu for bug-guile@gnu.org; Wed, 12 Dec 2012 18:14:35 -0500 X-IronPort-AV: E=Sophos;i="4.84,269,1355094000"; d="scan'208";a="165668927" Received: from reverse-83.fdn.fr (HELO pluto) ([80.67.176.83]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 13 Dec 2012 00:14:32 +0100 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 Frimaire an 221 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Thu, 13 Dec 2012 00:14:32 +0100 Message-ID: <87obhy7tif.fsf@gnu.org> User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) --=-=-= Content-Type: text/plain When running this: (false-if-exception (system* "does-not-exist")) a process is left behind. One possible solution is to make sure the child exits: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/libguile/simpos.c b/libguile/simpos.c index 5c8fe96..2e340e2 100644 --- a/libguile/simpos.c +++ b/libguile/simpos.c @@ -138,9 +138,7 @@ SCM_DEFINE (scm_system_star, "system*", 0, 0, 1, { /* child */ execvp (execargv[0], execargv); - SCM_SYSERROR; - /* not reached. */ - return SCM_BOOL_F; + _exit (127); } else { --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable We=E2=80=99d still need to print =E2=80=98strerror (errno)=E2=80=99 in the = child, though. Thoughts? Ludo=E2=80=99. --=-=-=-- From unknown Sat Jun 21 05:18:50 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#13166: closed (Re: bug#13166: =?UTF-8?Q?=E2=80=98system*=E2=80=99?= may leave dangling processes) Message-ID: References: <87vcbxbrq2.fsf@gnu.org> <87obhy7tif.fsf@gnu.org> X-Gnu-PR-Message: they-closed 13166 X-Gnu-PR-Package: guile Reply-To: 13166@debbugs.gnu.org Date: Wed, 19 Dec 2012 22:31:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1355956262-2818-1" This is a multi-part message in MIME format... ------------=_1355956262-2818-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #13166: =E2=80=98system*=E2=80=99 may leave dangling processes which was filed against the guile package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 13166@debbugs.gnu.org. --=20 13166: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D13166 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1355956262-2818-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 13166-done) by debbugs.gnu.org; 19 Dec 2012 22:30:09 +0000 Received: from localhost ([127.0.0.1]:51318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TlS9P-0000hw-6f for submit@debbugs.gnu.org; Wed, 19 Dec 2012 17:30:08 -0500 Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]:34050) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TlS9L-0000hJ-UY for 13166-done@debbugs.gnu.org; Wed, 19 Dec 2012 17:30:05 -0500 X-IronPort-AV: E=Sophos;i="4.84,320,1355094000"; d="scan'208";a="166349293" Received: from reverse-83.fdn.fr (HELO pluto) ([80.67.176.83]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 19 Dec 2012 23:29:57 +0100 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: 13166-done@debbugs.gnu.org Subject: Re: bug#13166: =?utf-8?B?4oCYc3lzdGVtKuKAmQ==?= may leave dangling processes References: <87obhy7tif.fsf@gnu.org> Date: Wed, 19 Dec 2012 23:29:57 +0100 In-Reply-To: <87obhy7tif.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 13 Dec 2012 00:14:32 +0100") Message-ID: <87vcbxbrq2.fsf@gnu.org> User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 13166-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) Fixed in 668ba7c. Ludo'. ------------=_1355956262-2818-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 12 Dec 2012 23:16:15 +0000 Received: from localhost ([127.0.0.1]:39681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TivXD-0006EA-HJ for submit@debbugs.gnu.org; Wed, 12 Dec 2012 18:16:15 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39231) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TivXA-0006E2-M7 for submit@debbugs.gnu.org; Wed, 12 Dec 2012 18:16:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TivWG-0001qx-QU for submit@debbugs.gnu.org; Wed, 12 Dec 2012 18:15:23 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-106.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:44515) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TivWG-0001qb-No for submit@debbugs.gnu.org; Wed, 12 Dec 2012 18:15:16 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TivVc-00039U-54 for bug-guile@gnu.org; Wed, 12 Dec 2012 18:14:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TivVb-00016x-5E for bug-guile@gnu.org; Wed, 12 Dec 2012 18:14:36 -0500 Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]:25511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TivVa-00016n-Uu for bug-guile@gnu.org; Wed, 12 Dec 2012 18:14:35 -0500 X-IronPort-AV: E=Sophos;i="4.84,269,1355094000"; d="scan'208";a="165668927" Received: from reverse-83.fdn.fr (HELO pluto) ([80.67.176.83]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 13 Dec 2012 00:14:32 +0100 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: bug-guile@gnu.org Subject: =?utf-8?B?4oCYc3lzdGVtKuKAmQ==?= may leave dangling processes X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 Frimaire an 221 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Thu, 13 Dec 2012 00:14:32 +0100 Message-ID: <87obhy7tif.fsf@gnu.org> User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) --=-=-= Content-Type: text/plain When running this: (false-if-exception (system* "does-not-exist")) a process is left behind. One possible solution is to make sure the child exits: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/libguile/simpos.c b/libguile/simpos.c index 5c8fe96..2e340e2 100644 --- a/libguile/simpos.c +++ b/libguile/simpos.c @@ -138,9 +138,7 @@ SCM_DEFINE (scm_system_star, "system*", 0, 0, 1, { /* child */ execvp (execargv[0], execargv); - SCM_SYSERROR; - /* not reached. */ - return SCM_BOOL_F; + _exit (127); } else { --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable We=E2=80=99d still need to print =E2=80=98strerror (errno)=E2=80=99 in the = child, though. Thoughts? Ludo=E2=80=99. --=-=-=-- ------------=_1355956262-2818-1--