This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/20375] posix_spawn fails when full signal set passed to posix_spawnattr_setsigdefault and POSIX_SPAWN_SETSIGDEF is set
- From: "adhemerval.zanella at linaro dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 19 Jul 2016 14:11:39 +0000
- Subject: [Bug libc/20375] posix_spawn fails when full signal set passed to posix_spawnattr_setsigdefault and POSIX_SPAWN_SETSIGDEF is set
- Auto-submitted: auto-generated
- References: <bug-20375-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=20375
--- Comment #3 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
Ok I see now, it fails because this bug is opened against the old posix_spawn
version which does:
sysdeps/posix/spawni.c:
127 /* Set signal default action. */
128 if ((flags & POSIX_SPAWN_SETSIGDEF) != 0)
129 {
130 /* We have to iterate over all signals. This could possibly be
131 done better but it requires system specific solutions since
132 the sigset_t data type can be very different on different
133 architectures. */
134 int sig;
135 struct sigaction sa;
136
137 memset (&sa, '\0', sizeof (sa));
138 sa.sa_handler = SIG_DFL;
139
140 for (sig = 1; sig <= _NSIG; ++sig)
141 if (__sigismember (&attrp->__sd, sig) != 0
142 && __sigaction (sig, &sa, NULL) != 0)
143 _exit (SPAWN_ERROR);
144
145 }
So if sigaction fail it bails out with a failure.
I think this bug is invalid because new posix_spawn implementation does not
have this limitation.
--
You are receiving this mail because:
You are on the CC list for the bug.