Insight of the day
I must be very silly, but I just realized that a Unix pipe is a semaphore. It's better in some aspects (is select()able) and worse in others (SEM_VALUE_MAX is lower). Cool.
In that context, the "signal handler that writes to a pipe" trick makes a new kind of sense (the semaphore equivalent, sem_post(), is the only synchronization function that is safe to use in a signal handler).
Syndicated 2007-03-08 12:34:38 (Updated 2007-03-08 12:38:16) from Pierre Phaneuf
