Collin Funk wrote: > The actual issue was that Gnulib's posix_spawn calls sigismember in the > child process with NSIG. On OpenBSD and Solaris this causes it to return > -1 and set errno to EINVAL. > > I pushed the attatched patch to Gnulib
Thanks! Indeed, our lib/signal.in.h says that NSIG is the "Maximum signal number + 1." The bug was present in gnulib/lib/spawni.c since 2008, when I borrowed the code from glibc/sysdeps/posix/spawni.c. Meanwhile, this bug is no longer present in glibc: The new code in glibc/sysdeps/mach/hurd/spawni.c:348: for (i = 1; i < NSIG; ++i) glibc/sysdeps/unix/sysv/linux/spawni.c:119: for (int sig = 1; sig < _NSIG; ++sig) is correct. Bruno
