projects
/
kopensolaris-gnu
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5f80720
)
Likewise. Take care for ACT being NULL.
author
drepper
<drepper>
Mon, 8 Dec 1997 03:04:11 +0000
(
03:04
+0000)
committer
drepper
<drepper>
Mon, 8 Dec 1997 03:04:11 +0000
(
03:04
+0000)
sysdeps/unix/sysv/linux/i386/sigaction.c
patch
|
blob
|
history
diff --git
a/sysdeps/unix/sysv/linux/i386/sigaction.c
b/sysdeps/unix/sysv/linux/i386/sigaction.c
index
90d61a0
..
05d187c
100644
(file)
--- a/
sysdeps/unix/sysv/linux/i386/sigaction.c
+++ b/
sysdeps/unix/sysv/linux/i386/sigaction.c
@@
-47,19
+47,24
@@
__sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
/* First try the RT signals. */
if (__libc_have_rt_sigs)
{
/* First try the RT signals. */
if (__libc_have_rt_sigs)
{
- struct sigaction nact;
+ struct sigaction nact
, *nactp
;
- nact.sa_handler = act->sa_handler;
- memcpy (&nact.sa_mask, &act->sa_mask, sizeof (sigset_t));
- nact.sa_flags = act->sa_flags;
+ if (act)
+ {
+ nact.sa_handler = act->sa_handler;
+ memcpy (&nact.sa_mask, &act->sa_mask, sizeof (sigset_t));
+ nact.sa_flags = act->sa_flags;
- nact.sa_restorer = ((act->sa_flags & SA_NOMASK)
- ? &&restore_nomask : &&restore);
+ nact.sa_restorer = ((act->sa_flags & SA_NOMASK)
+ ? &&restore_nomask : &&restore);
+ nactp = &nact;
+ }
+ else
+ nactp = NULL;
/* XXX The size argument hopefully will have to be changed to the
real size of the user-level sigset_t. */
/* XXX The size argument hopefully will have to be changed to the
real size of the user-level sigset_t. */
- result = __syscall_rt_sigaction (sig, &nact, oact,
- _NSIG / (8 * sizeof (long int)));
+ result = __syscall_rt_sigaction (sig, nactp, oact, _NSIG / 8);
if (result >= 0 || errno != ENOSYS)
return result;
if (result >= 0 || errno != ENOSYS)
return result;