See Richard Stevens book on the Unix kernel. It should be on the shelf.
-- 
Tossed into a salad of random spelling corrections and word insertions before being served up by my Android phone.

Kristian Amlie <notifications@github.com> wrote:
>> +    {
>> +        // send() is async-safe, according to POSIX.
>> +        if (send(SIGNAL_PIPE[1], &sig, 1, 0) < 0)
>> +        {
>> +            // These signal contention. Everything else is an error.
>> +            if (errno != EAGAIN
>> +#ifndef __MINGW32__
>> +                && errno != EWOULDBLOCK
>> +#endif
>> +                )
>> +            {
>> +                // This is not async safe, but if we get in here
>there's something really weird
>> +                // going on.
>> +                Log(LOG_LEVEL_CRIT, "Could not write to signal pipe.
>Unsafe to continue. (write: '%s')",
>> +                    GetErrorStr());
>> +                exit(1);
>
>Right. I've seen that comment somewhere in CFEngine before. Do you know
>why this loop occurs? It seems to suggest that something is broken
>elsewhere in the code...
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/cfengine/core/pull/1031/files#r7124343