summaryrefslogtreecommitdiff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-09-29 08:48:32 +0000
committerJakub Jelinek <jakub@redhat.com>2004-09-29 08:48:32 +0000
commit2b13f2ccc0b53bb2f3a4f6dcc006d4dea7149e16 (patch)
tree4d407d9cf3aaa05d597017bf8c326fda4e960f66 /sysdeps/generic
parentf1750fb9c68854778e6e023ed490ff80e1c90167 (diff)
Updated to fedora-glibc-20040929T0821
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/bits/waitstatus.h18
-rw-r--r--sysdeps/generic/sigfillset.c6
2 files changed, 15 insertions, 9 deletions
diff --git a/sysdeps/generic/bits/waitstatus.h b/sysdeps/generic/bits/waitstatus.h
index 982c9dbb28..699c224989 100644
--- a/sysdeps/generic/bits/waitstatus.h
+++ b/sysdeps/generic/bits/waitstatus.h
@@ -1,5 +1,5 @@
/* Definitions of status bits for `wait' et al.
- Copyright (C) 1992, 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1992,1994,1996,1997,2000,2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,23 +38,25 @@
#define __WIFEXITED(status) (__WTERMSIG(status) == 0)
/* Nonzero if STATUS indicates termination by a signal. */
-#ifdef __GNUC__
-# define __WIFSIGNALED(status) \
- (__extension__ ({ int __status = (status); \
- !__WIFSTOPPED(__status) && !__WIFEXITED(__status); }))
-#else /* Not GCC. */
-# define __WIFSIGNALED(status) (!__WIFSTOPPED(status) && !__WIFEXITED(status))
-#endif /* GCC. */
+#define __WIFSIGNALED(status) \
+ (((signed char) (((status) & 0x7f) + 1) >> 1) > 0)
/* Nonzero if STATUS indicates the child is stopped. */
#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
+/* Nonzero if STATUS indicates the child continued after a stop. We only
+ define this if <bits/waitflags.h> provides the WCONTINUED flag bit. */
+#ifdef WCONTINUED
+# define __WIFCONTINUED(status) ((status) == __W_CONTINUED)
+#endif
+
/* Nonzero if STATUS indicates the child dumped core. */
#define __WCOREDUMP(status) ((status) & __WCOREFLAG)
/* Macros for constructing status values. */
#define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f)
+#define __W_CONTINUED 0xffff
#define __WCOREFLAG 0x80
diff --git a/sysdeps/generic/sigfillset.c b/sysdeps/generic/sigfillset.c
index 5f91fa6bda..95d52cf0c0 100644
--- a/sysdeps/generic/sigfillset.c
+++ b/sysdeps/generic/sigfillset.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,96,97,2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1991,96,97,2002,2003,2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,6 +37,10 @@ sigfillset (set)
#ifdef SIGCANCEL
__sigdelset (set, SIGCANCEL);
#endif
+ /* Likewise for the signal to implement setxid. */
+#ifdef SIGSETXID
+ __sigdelset (set, SIGSETXID);
+#endif
return 0;
}