Subject: bug#13166: closed (Re: bug#13166: ‘system*’may leave dangling processes)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 19 Dec 2012 22:31:02 +0000

Your bug report

#13166: ‘system*’ 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 [email-masked].

-- 
13166: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13166
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#13166: ‘system*’ may leave dangling processes
From: [email-masked] (Ludovic Courtès)
To: [email-masked]
Date: Wed, 19 Dec 2012 23:29:57 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Fixed in 668ba7c.

Ludo'.

Subject: ‘system*’ may leave dangling processes
From: [email-masked] (Ludovic Courtès)
To: [email-masked]
Date: Thu, 13 Dec 2012 00:14:32 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

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:

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
         {

We’d still need to print ‘strerror (errno)’ in the child, though.

Thoughts?

Ludo’.