On Mon, 14 Nov 2011 12:15:37 +0100
nicolas edel <nicolas.edel@...> wrote:
> When using run-program function, a process object is returned even if
> the real process can't be started. I asked about this on sbcl-help and
> I have been told nothing was planned to fix this.
> As mentionned in the HACKING file of sbcl, I wrote a git compliant
> patch to fix this. It works fine on Linux/FreeBSD. It only concerns
> the C code to make the patch as minimalist as possible.
> Any comment welcome.
After fork(2), if exec*(2) fails, it's best to call _exit(2) than
exit(3), if I remember. The reason being that the image might be
corrupt and that _exit(2) will still do the necessary stuff like
SIGCHLD, but will avoid trying to clean up libc-specific resources (the
kernel will take care of system resources like file descriptors).