diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/spawni.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/spawni.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/spawni.c b/sysdeps/unix/sysv/linux/spawni.c index d7f9e83575..a10c1aa363 100644 --- a/sysdeps/unix/sysv/linux/spawni.c +++ b/sysdeps/unix/sysv/linux/spawni.c @@ -177,6 +177,10 @@ __spawni_child (void *arguments) } #endif + if ((attr->__flags & POSIX_SPAWN_SETSID) != 0 + && __setsid () < 0) + goto fail; + /* Set the process group ID. */ if ((attr->__flags & POSIX_SPAWN_SETPGROUP) != 0 && (ret = __setpgid (0, attr->__pgrp)) != 0) |