[systemd-devel] [PATCH] event: clear pending-state when re-arming timers
David Herrmann
dh.herrmann at gmail.com
Wed Nov 20 13:26:01 PST 2013
Hi
On Wed, Nov 20, 2013 at 9:18 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Wed, 20.11.13 07:59, David Herrmann (dh.herrmann at gmail.com) wrote:
>
>> If a timer fires and is marked pending, but an application re-arms it
>> before it is dispatched, we now clear the pending state.
>>
>> This fixes a bug where an application arms a timer, which fires and is
>> marked pending. But before it is dispatched, the application loses
>> interest in it and disables it. Now if the timer is re-armed and
>> re-enabled later, it will be immediately dispatched as it is still marked
>> pending.
>>
>> This behavior is unexpected, so avoid it by clearing pending state when
>> re-arming timers. Note that applications have no way to clear pending
>> state themselves, so there's no current workaround.
>
> Same mistake was actually was actually in the handling of changing of
> the accuracy and of IO events too. Fixed those too now.
Yepp, I've seen your other fixes. That was actually the reason why I
didn't commit it right away. Thanks for fixing it up!
> When you push a patch please reply to the mail you posted on
> systemd-devel (if you posted one) and simply say "Commited." or so, so
> that it is easy for us to track what got already merged and what didn't!
> Thanks!
I committed it on accident due to a failed rebase, sorry. You probably
didn't get my msg on irc.
Thanks
David
More information about the systemd-devel
mailing list