[Ecls-list] patch for serve-event

Nathan Hawkins utsl at quic.net
Fri Apr 25 18:25:53 UTC 2008


The attached patch fixes serve-event to suppress EINTR errors. This came 
up while porting some code I wrote for SBCL.

The other attachment, test-serve-event.lisp contains test code. It 
starts a thread running serve-all-events in a loop. The original thread 
will run a loop that runs interrupt-process against the serve-event 
thread every 5 seconds.

Running the test case without the patch will fail. With the patch, 
interrupt-process will signal the second thread, causing select to exit 
with EINTR, which will now just exit serve-event. With the patch, the 
test case should print "serve-event-loop interrupted" on the console 
every 5 seconds. It works for me. :-)

Nathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecl-serve-event-eintr.diff
Type: text/x-diff
Size: 4216 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20080425/5cf74837/attachment.diff>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test-serve-event.lisp
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20080425/5cf74837/attachment.ksh>


More information about the ecl-devel mailing list