Skip to content

Commit 8b2edef

Browse files
committed
posix_spawn: handle pgroup = -1
1 parent 7a39215 commit 8b2edef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

process.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4676,7 +4676,7 @@ rb_posix_spawn(struct rb_execarg *eargp)
46764676
posix_spawnattr_t attr;
46774677
posix_spawnattr_init(&attr);
46784678

4679-
if (eargp->pgroup_given) {
4679+
if (eargp->pgroup_given && eargp->pgroup_pgid != -1) {
46804680
if ((err = posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETPGROUP))) {
46814681
rb_syserr_fail(err, "posix_spawnattr_setflags");
46824682
}

0 commit comments

Comments
 (0)