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.

Juanjo

-- 
Instituto de FĂ­sica Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to