chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] chicken interupt handling


From: John Cowan
Subject: Re: [Chicken-users] chicken interupt handling
Date: Mon, 5 Sep 2011 15:31:08 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

Jörg F. Wittenberger scripsit:

> But not being allowed to allocate memory in the signal handler was
> still too much of a road block for me.

Unfortunately, that's what Posix says.  If you look at the table at
http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04_03
you'll see a list of Posix functions that it's safe to call from a
signal handler, and malloc() and free(), or anything traditionally
implemented using either one, is not on that list.  The reason is that
most C libraries don't have reentrant allocators.

-- 
John Cowan                              address@hidden
            http://www.ccil.org/~cowan
Humpty Dump Dublin squeaks through his norse
                Humpty Dump Dublin hath a horrible vorse
But for all his kinks English / And his irismanx brogues
                Humpty Dump Dublin's grandada of all rogues.  --Cousin James



reply via email to

[Prev in Thread] Current Thread [Next in Thread]