[erlang-questions] Signal handling (TERM, INT etc)

Johnny Billquist bqt@REDACTED
Tue Jul 8 02:00:58 CEST 2008


Tony Finch wrote:
> On Mon, 7 Jul 2008, Johnny Billquist wrote:
>> Tony Finch wrote:
>>> On Tue, 1 Jul 2008, Claes Wikström wrote:
>>>> 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.
> 
> Which signal?
> 
> Tony.

Any signal.
You'll have to write some other code to help figure out exactly which 
signal occured.

	Johnny




More information about the erlang-questions mailing list