News for hackers. Stuff that matters.
Re:All about Linux signals - Linux Programming Blog by javert on Tuesday April 03, 2012 @02:18PM (#3794111)
Thanks.

That example doesn't live up to the hype that was mentioned by a previous poster and that had me worried. However, that hype was probably overstated.

For example, "there are certain race conditions if you rely on signals to interrupt system calls and the interrupt happens before the syscall is called" -> seems to imply there are race conditions inherent to the situation, not race conditions that can be introduced by programmer mistake (which is pretty obvious, IMO).

Also "since your code could have been anywhere in the execution path you can only do very limited amount of things within the signal handler that won't cause catastrophic issues otherwise" -> I just don't believe that; you can do lots of things in the signal handler if you know what you're doing.

Re:All about Linux signals - Linux Programming Blog by calloc on Tuesday April 03, 2012 @06:26PM (#3795115)
Sure, you can do lots of things in the signal handler, if you are careful, but that is the point, it is more likely you will make a mistake than not. It is very simple to think, let me add this to the signal handler it will make my life easier and cause all kinds of weird issues that happen randomly like a heisenbug...