[erlang-questions] Signal handling (TERM, INT etc)
Johnny Billquist
bqt@REDACTED
Mon Jul 7 22:02:33 CEST 2008
Tony Finch wrote:
> On Tue, 1 Jul 2008, Claes Wikström wrote:
>> Only possible solution I see is to
>>
>> 1. Have a socket setup from the driver to the beam (over loopback)
>> 2. in the sighandler write some data on the socket.
>
> Some of my friends recommend this technique for C programs too, so that it
> becomes possible to select() for signals in the same way as other events.
Why not check for EINTR as the possible reason for -1 as returned from
select()?
Even if you have a signal handler, the select() will return -1 when a
signal occurs.
Johnny
More information about the erlang-questions
mailing list