[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: sigaction module
From: |
Eric Blake |
Subject: |
Re: RFC: sigaction module |
Date: |
Mon, 16 Jun 2008 18:19:26 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080421 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Paul Eggert on 6/16/2008 5:01 PM:
|
|> + /* This opens a slight window where an async signal can call
|> + wrong handler. Oh well. */
|> + oact->sa_handler = signal (sig, SIG_DFL);
|
|
| Isn't it easy to close this window when oact and act are both nonnull?
| In that case, you can invoke 'signal' once, without opening this
| particular race condition.
True enough; but generally sigaction is often used with NULL act and
non-NULL oact to query the current settings before doing anything else, so
it won't benefit existing gnulib clients.
|
| More generally, can't you use sigprocmask to avoid this class of race
| conditions within sigaction? (I don't know the platform.)
mingw lacks sigprocmask. There is a gnulib module replacement, but it too
suffers from the race condition. In general, I know of no way to make
mingw immune to poorly timed signals.
- --
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
iEYEARECAAYFAkhXAw4ACgkQ84KuGfSFAYB3xwCePiYbirIMrxJqvFumcoL7r0RP
b2gAn1xTMOWYdRLEa4gfUausdfyLBDRc
=OH1L
-----END PGP SIGNATURE-----
- RFC: sigaction module, Eric Blake, 2008/06/16
- Re: RFC: sigaction module, Paul Eggert, 2008/06/16
- Re: RFC: sigaction module,
Eric Blake <=
- Re: RFC: sigaction module, Bruno Haible, 2008/06/17
- Re: RFC: sigaction module, Eric Blake, 2008/06/17
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Bruno Haible, 2008/06/17
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Eric Blake, 2008/06/17
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Bruno Haible, 2008/06/18
- RE: sigaction, SA_SIGINFO, and SIG_IGN, Jason Zions, 2008/06/18
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Bruno Haible, 2008/06/19
- Re: Interix, Bruno Haible, 2008/06/19
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Paul Eggert, 2008/06/19
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Bruno Haible, 2008/06/19