[erlisp-devel] Re: Fwd: [Sbcl-devel] async signals

Ivan Boldyrev lispnik at gmail.com
Sun Sep 18 12:21:38 UTC 2005


On 9236 day of my life David Hopwood wrote:
> In the case of shared memory concurrency, killing processes asynchronously
> is a minefield; it is so difficult to do right that IMO it should not be
> attempted.

Un Unix-like (or POSIX-like) The only safe thing you can do during
asynchronous interrupt handling is to read or set variable of some
type sig_atomic_t.

Doing anything else is opening can of worm.

And it doesn't matter if it is shared memory concurrency or
single-thread program: what if process receives yet another
asynchronous signal in signal handler?  It may corrupt variable you
write to if it is other than sig_atomic_t.

-- 
Ivan Boldyrev

                                       XML -- new language of ML family.



More information about the Erlisp-devel mailing list