GNU bug report logs - #13166
‘system*’ may leave dangling processes

Previous Next

Package: guile;

Reported by: ludo <at> gnu.org (Ludovic Courtès)

Date: Wed, 12 Dec 2012 23:17:02 UTC

Severity: normal

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: tracker <at> debbugs.gnu.org
Subject: bug#13166: closed (‘system*’ may
 leave dangling processes)
Date: Wed, 19 Dec 2012 22:31:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 19 Dec 2012 23:29:57 +0100
with message-id <87vcbxbrq2.fsf <at> gnu.org>
and subject line Re: bug#13166: ‘system*’ may leave dangling processes
has caused the debbugs.gnu.org bug report #13166,
regarding ‘system*’ may leave dangling processes
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
13166: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13166
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: ludo <at> gnu.org (Ludovic Courtès)
To: bug-guile <at> gnu.org
Subject: ‘system*’ may leave dangling processes
Date: Thu, 13 Dec 2012 00:14:32 +0100
[Message part 3 (text/plain, inline)]
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:

[Message part 4 (text/x-patch, 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
         {
[Message part 5 (text/plain, inline)]
We’d still need to print ‘strerror (errno)’ in the child, though.

Thoughts?

Ludo’.
[Message part 6 (message/rfc822, inline)]
From: ludo <at> gnu.org (Ludovic Courtès)
To: 13166-done <at> debbugs.gnu.org
Subject: Re: bug#13166: ‘system*’ may leave dangling
	processes
Date: Wed, 19 Dec 2012 23:29:57 +0100
Fixed in 668ba7c.

Ludo'.


This bug report was last modified 12 years and 156 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.