bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Replacement for the sigs_to_ignore hack in timeout.c


From: Eric Blake
Subject: Re: [PATCH] Replacement for the sigs_to_ignore hack in timeout.c
Date: Thu, 16 Oct 2008 06:22:55 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080914 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[adding bug-gnulib]

According to Jim Meyering on 10/16/2008 1:30 AM:
> Eric Blake <address@hidden> wrote:
> ...
>> Subject: [PATCH] csplit: prefer sigaction over signal
>>
>> * bootstrap.conf (gnulib_modules): Import sigaction.
>> * src/csplit.c (sigprocmask, siginterrupt) [SA_NOCLDSTOP]: Delete
>> workarounds.
>> (interrupt_handler, main): Drop use of signal.  Rely on sigaction
>> to block fatal signal during cleanup, and to restore it to default
>> in case of nested signals.
>
> Impeccable!
> Thank you.  Please push it.

Done.  Meanwhile, back to my original question:

According to Eric Blake on 10/13/2008 10:18 PM:
> Round 1: csplit.  The use of signal here mirrors what Bruno's fatal-signal
> module in gnulib provides, although the set of signals masked is
> different.  Which would you prefer, a patch that swaps over to
> fatal-signal usage (leaving at least SIGPOLL and SIGALRM unprotected), or
> this patch?  I'm kind of leaning towards simplifying this file by using
> fatal-signal, but had already written this, and wanted some feedback.
>

When used in a library, the gnulib fatal-signal module must assume that
the rest of the program can use SIGPOLL and SIGALRM for its own purposes.
 But when used in a stand-alone app, such as csplit, where it is known in
advance that these signals are not used, it would be nice to include them
in the set of fatal signals.  In other words, right now, csplit is _not_
using fatal-signals, because it wants to react to additional signals
beyond the default provided by the gnulib module.  Is there a way we could
extend the API of fatal-signals to allow an application to request that
SIGPOLL and SIGALRM be added to the set of signals to react to?

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkj3Mh4ACgkQ84KuGfSFAYD5FgCggtmDZhyYJM9vggcVQJuJuDZ+
aE8An0toPdDJdzN15j1G5zHmuMbADD+T
=ZQSs
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]