DragonFly submit List (threaded) for 2004-03
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: patch to make script(1) exit cleanly on reciept of signal
On Wed, 31 Mar 2004 19:47:56 -0800 (PST)
Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx> wrote:
> :Chris Pressey <cpressey@xxxxxxxxxxxxxxx> wrote:
> :> http://catseye.webhop.net/DragonFlyBSD/patch/script.diff
>
> Looks good. One change and you are done... a flushtime of 0 is
> now illegal (because that will cause the select() to poll and
> script to go into a cpu-bound loop), so change the flushtime < 0
> test to flushtime <= 0.
Er - I just realized - I think it's even worse than that. If the user
specifies a flushtime of 0 (which is perfectly legal according to the
man page, and I don't think we want to change that,) tvp is a NULL
pointer rather than a pointer to our timeout. Which means our signal
handler doesn't have any effect at all on select(), because it's
changing a timeout that isn't used :)
Thanks for making me think about it - I'll rewrite it, probably using
your suggestion #1 instead.
-Chris
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]