Skip to content

Commit 5969665

Browse files
committed
posix_spawn: handle pgroup = -1
1 parent d69a6f6 commit 5969665

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
@@ -4678,7 +4678,7 @@ rb_posix_spawn(struct rb_execarg *eargp)
46784678
posix_spawnattr_t attr;
46794679
posix_spawnattr_init(&attr);
46804680

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

0 commit comments

Comments
 (0)