gpg-agent timer tick
wk at gnupg.org
Sat Jan 12 20:12:33 CET 2008
On Sat, 12 Jan 2008 00:14, alan-jenkins at tuffmail.co.uk said:
> that there are many programs which do the same. Say you have four
> programs that do exactly the same thing. Then the CPU is potentially
> waking up every half a second, which is not so good.
I understand. I a conventionally programming environment it is usually
the best to distribute CPU work most evenly over the time and thus
making shure that not all timer fire exactly at the full seconds or so.
Well for power saving this is different. gpg-agent should do something
> second no matter how many programs use it. Redhat have hacked several
> programs they distribute to round their wakeups to the nearest second
> and perhaps gpg-agent could do the same.
Shall we change the timer code to do just that? Run on the full even
> the simpler cases that cross my path. I don't know if there's
> anything I can say to inspire you, but it's one of the things the
I know. However I hve not thought that gpg-agent is really a candidate
for it. You convinced me.
> Yes, that sure would be annoying. That's not quite what happens
> though. Child processes aren't automatically killed when their parent
> terminates. The reason that seems to happen with shells is that the
> shell is a "session leader"; it starts commands in the same "session",
I know. However, the current code is pretty weel matured and I don't
want to add new bugs right now. In particular not if we need a timer
anyway and if we the change to sync all timer events will be easier than
changing this code.
> I did wonder about the generic name (handle_tick()). You don't need a
> ticker though; you can can use a timer. You don't need to say "wake
> me up every 10 seconds so I can see if I need to do anything"; you can
> say "the users passphrase is going to expire in half an hour; wake me
> up at that point". If you have multiple timers or timers that need
> cancelling or readjusting, it may end up slightly easier / clearer if
> you use the timers in libpth.
I think that this code wouul be more complex than a timer tick to handle
> Many thanks! (I think you deserve them if you read this entire email).
I assigned bug 871 to it.
Die Gedanken sind frei. Auschnahme regelt ein Bundeschgesetz.
More information about the Gnupg-devel