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

According to Bruno Haible on 6/17/2008 7:17 PM:
|> @@ -96,11 +98,10 @@ init_fatal_signals (void)
|>     struct sigaction action;
|>
|>     if (sigaction (fatal_signals[i], NULL, &action) >= 0
|> +              && (action.sa_flags & SA_SIGINFO) == 0
|>         && action.sa_handler == SIG_IGN)
|>       fatal_signals[i] = -1;
|>   }
|
| What does this SA_SIGINFO business mean? Why do you need to check whether
| (sa_flags & SA_SIGINFO) == 0 when sa_handler is known to be SIG_IGN?

Pre-existing bug.  POSIX states that sa_handler and sa_siginfo may, but
not must, occupy overlapping space, and that sa_handler must not be
accessed if sa_flags includes SA_SIGINFO.  Therefore, it is conceivable to
have an implementation where action.sa_handler is garbage and happens to
be SIG_IGN, because only action.sa_siginfo was valid to access.  (In
reality, all implementations I am aware of, including my replacement, use
a union and let the two function definitions overlap, so this is more of a
theoretical bug fix.)  Should I use a separate commit for this bug fix?

- --
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

iEYEARECAAYFAkhYZDEACgkQ84KuGfSFAYBpeQCgwAlcZfCBTAXgN1xEw17L4cfE
eQcAnRjn08ozxDAxn4vzP0JjkZ9puxD3
=Q2J+
-----END PGP SIGNATURE-----


Reply via email to