-----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 [EMAIL PROTECTED] -----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-----
