X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Frun-program.c;h=00692b707ec6ff88e70cea3006f61f6016b65b83;hb=625c9493a8a7b5186144d21302437cf4f4f3571c;hp=7377e7fccf3674a00d07ca9794438df33c355bb1;hpb=6cfdd9e66519b513e0935c410fbb30fc880efb61;p=sbcl.git diff --git a/src/runtime/run-program.c b/src/runtime/run-program.c index 7377e7f..00692b7 100644 --- a/src/runtime/run-program.c +++ b/src/runtime/run-program.c @@ -138,9 +138,12 @@ int spawn(char *program, char *argv[], int sin, int sout, int serr, p += n; } } + close(channel[0]); if (child_errno) { waitpid(pid, NULL, 0); - pid = 0; + /* Our convention to tell Lisp that it was the exec that + * failed, not the fork. */ + pid = -2; errno = child_errno; } }