[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13166: ‘system*’ may leave dangling processes
From: |
Ludovic Courtès |
Subject: |
bug#13166: ‘system*’ may leave dangling processes |
Date: |
Thu, 13 Dec 2012 00:14:32 +0100 |
User-agent: |
Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) |
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’.
- bug#13166: ‘system*’ may leave dangling processes,
Ludovic Courtès <=