System signals

Sean Kelly sean at invisibleduck.org
Mon Apr 30 06:50:50 PDT 2012


On Apr 29, 2012, at 9:28 PM, H. S. Teoh wrote:

> On Sun, Apr 29, 2012 at 11:47:24PM +0200, deadalnix wrote:
> [...]
>> You misunderstood me (the sentence was not clear). I mean, you cannot
>> catch kill and the trick mentioned int he link is linux specific.
>> Obviously, the fact that you cannot catch kill isn't linux specific ;)
> 
> Ah, I see.
> 
> But really? I thought the self-pipe trick is portable across Posix
> platforms. But then again, my last contact with a non-Linux Posix system
> was, oh, at least 8 years ago with a Solaris workstation, so I could be
> totally wrong.

It's legal to call write() in a signal handler, so if the socket is calling select() or poll() or whatever, something along those lines should work just fine.  As for catching kill, I thought the signal handler would fire but when it exited the app would still terminate.  No?


More information about the Digitalmars-d mailing list