Re: signal handling

2015-02-09 Thread Danny via Digitalmars-d-learn
Hmmm... Just found , the bottom part "Compliant Solution (POSIX)" does raise() in the signal handler. However, I can't find it in the POSIX standard at

Re: signal handling

2015-02-09 Thread rlonstein via Digitalmars-d-learn
On Saturday, 7 February 2015 at 18:30:00 UTC, Danny wrote: [snip] Seems to work fine so far. Not sure whether it's safe to raise() inside a signal handler. Calling raise() without reinstalling the old signal handler is a very bad idea, I [snip] I'm not sure that it's really safe to cal

Re: signal handling

2015-02-07 Thread Danny via Digitalmars-d-learn
Hi rlonstein, I've now read up on the opengroup pages about signal handling (which references POSIX), and apparently it goes like this: A signal can be delivered to a specific thread or to a process. If it's delivered to a process, a random thread of that process will receive i

Re: signal handling

2015-02-07 Thread rlonstein via Digitalmars-d-learn
On Friday, 6 February 2015 at 19:40:44 UTC, Danny wrote: Hi, if I want to clean up inside a signal handler and then exit the process (as it would have without me handling it), what do I do? Can I exit() inside a signal handler or should I use a more direct "quit now" function? (after all, it

signal handling

2015-02-06 Thread Danny via Digitalmars-d-learn
Hi, if I want to clean up inside a signal handler and then exit the process (as it would have without me handling it), what do I do? Can I exit() inside a signal handler or should I use a more direct "quit now" function? (after all, it could have been in the middle of relinking the free list