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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13166 in the body.
You can then email your comments to 13166 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#13166; Package guile. (Wed, 12 Dec 2012 23:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to ludo <at> gnu.org (Ludovic Courtès):
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Wed, 12 Dec 2012 23:17:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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 1 (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 2 (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 3 (text/plain, inline)]
We’d still need to print ‘strerror (errno)’ in the child, though.

Thoughts?

Ludo’.

Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Wed, 19 Dec 2012 22:31:02 GMT) Full text and rfc822 format available.

Notification sent to ludo <at> gnu.org (Ludovic Courtès):
bug acknowledged by developer. (Wed, 19 Dec 2012 22:31:02 GMT) Full text and rfc822 format available.

Message #10 received at 13166-done <at> debbugs.gnu.org (full text, mbox):

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'.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 17 Jan 2013 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 100 days ago.

Previous Next


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