[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Exit codes from subprocesses?



Subprocesses executed under CLISP's control always return 0. I gather that
the integer is actually meant to represent the exit code of the child
process. Unfortunately, after looking at the source, the SIGCHLD handler is
set to SIG_IGN which means children can freely exit before their parent
does a wait. Thus, when the interpreter goes to do a wait, it detects an
error and returns 0. I don't believe this is the intended behavior, but I'm
not sure  how to cleanly incorporate a fix. An example of the problem
follows.


> (execute "/usr/sww/bin/GNU/ls" "blah")
/usr/sww/bin/GNU/ls-3.12: blah: No such file or directory
0
> 

							--Bri