On Oct 1, 2013, at 1:16 PM, Maxim Fomin <ma...@maxim-fomin.ru> wrote:
> 
> Druntime can catch SIGINT and throw the exception. This means that D runtime 
> can be easily broken by silly C code which uses its own signal handlers. I 
> didn't tested, but believe this is already the case with respect to SIGUSR1 
> and SIGUSR2 which are used by druntime, so any simple code hijacking the 
> signals can break runtime. Linux signals handlers as error mechanism is a 
> complete disaster.

Unix signal handlers in general are a complete disaster.  The core idea is 
good, but the Posix requirements surrounding them are so loose as to render 
them nearly unusable.

I wasn't aware of pthread_suspend and it appears to be quite new.  Does anyone 
know if it's implemented in Linux yet?  A StackThreads discussion I found from 
a few years ago said it isn't, but a lot can change in a few years.  I would 
absolutely love to do away with using signals for coordinating garbage 
collection wherever possible.

Reply via email to