[Ecls-list] Solved problem with RUN-PROGRAM

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Thu Apr 26 20:00:04 UTC 2012

Ever since the introduction of EXT:RUN-PROGRAM, ECL was experiencing random
deadlocks when executing other programs. The reason for that was that the
external process ended before ECL was able of calling sigwait() and
retrieve its exit code --- the SIGPIPE arrived, but ECL had not yet
finished constructing the external process structure and got lost.

I have finally solved this stupid problem by synchronizing the child and
the parent processes: using a pipe, the parent holds the child until the
process structure is recorded with ECL. From that time on, ECL can keep
track of the SIGPIPE POSIX signal that announces the end of the child
process, providing the exit code.

This fixes one of the most annoying bugs I ever faced -- 1 year and a half
to come up with a solution, wow.


Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20120426/cf68bc3f/attachment.html>

More information about the ecl-devel mailing list