On 09/22/2011 09:49 AM, Jim Meyering wrote: > Pádraig Brady wrote: >> I can't think of anything better, >> so attached is a full patch for the above method. > > That was a surprisingly tricky problem. > Thanks for dealing with it. > >> I'd prefer to avoid timer_settime() if it creates a thread, >> but I don't know how to portably detect the presence of multiple threads. >> An alternative to ignore signals we send to our own group is >> attach a marker to the signal with sigqueue() and we >> could then discard all such signals. But that functionality >> is missing on many platforms and would complicate things anyway. > > I like your solution. > Its apparent simplicity is deceptive. > Maybe add a NEWS entry?
I'll merge this in and push +** Changes in behavior + + timeout now only processes the first signal received from the set + it is handling (SIGTERM, SIGINT, ...). This is to support systems that + implicitly create threads for some timer functions (like GNU/kFreeBSD). cheers, Pádraig.
