Attempt to handle systems with SA_SIGINFO but that lack SI_USER.

This commit is contained in:
Todd C. Miller
2014-07-28 20:25:46 -06:00
parent 99ae71452a
commit ae0014d6f4
3 changed files with 14 additions and 3 deletions

View File

@@ -24,6 +24,17 @@
# define MSG_WAITALL 0
#endif
/*
* Some older systems support siginfo but predate SI_USER.
*/
#ifdef SA_SIGINFO
# ifdef SI_USER
# define USER_SIGNALED(_info) ((_info) != NULL && (_info)->si_code == SI_USER)
# else
# define USER_SIGNALED(_info) ((_info) != NULL && (_info)->si_code <= 0)
# endif
#endif
/*
* Special values to indicate whether continuing in foreground or background.
*/