[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: timeout: heads up: kFreeBSD's timers cause all timeout tests to hang
From: |
Pádraig Brady |
Subject: |
Re: timeout: heads up: kFreeBSD's timers cause all timeout tests to hang |
Date: |
Thu, 22 Sep 2011 11:42:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 |
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.