diff --git a/libc/proc/posix_spawn.c b/libc/proc/posix_spawn.c index c3eaac6a942..9392ee54b30 100644 --- a/libc/proc/posix_spawn.c +++ b/libc/proc/posix_spawn.c @@ -350,7 +350,7 @@ static textwindows errno_t posix_spawn_nt_impl( // figure out flags uint32_t dwCreationFlags = 0; short flags = attrp && *attrp ? (*attrp)->flags : 0; - if (flags & POSIX_SPAWN_SETPGROUP) + if (flags & (POSIX_SPAWN_SETPGROUP | POSIX_SPAWN_SETSID)) dwCreationFlags |= kNtCreateNewProcessGroup; // create process startinfo