Tune posix_spawn() successful fix

This commit is contained in:
Justine Tunney 2024-10-11 07:10:43 -07:00
parent a8bc7ac119
commit 706cb66310
No known key found for this signature in database
GPG key ID: BE714B4575D6E328

View file

@ -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