Skip to content

Commit 971d19a

Browse files
radiohertzalexrp
authored andcommitted
fix(windows): handle commitment limit error in CreateProcessW
1 parent c1649d5 commit 971d19a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/std/os/windows.zig

+2
Original file line numberDiff line numberDiff line change
@@ -1924,6 +1924,7 @@ pub const CreateProcessError = error{
19241924
InvalidName,
19251925
NameTooLong,
19261926
InvalidExe,
1927+
SystemResources,
19271928
Unexpected,
19281929
};
19291930

@@ -2018,6 +2019,7 @@ pub fn CreateProcessW(
20182019
// when calling CreateProcessW on a plain text file with a .exe extension
20192020
.EXE_MACHINE_TYPE_MISMATCH,
20202021
=> return error.InvalidExe,
2022+
.COMMITMENT_LIMIT => return error.SystemResources,
20212023
else => |err| return unexpectedError(err),
20222024
}
20232025
}

0 commit comments

Comments
 (0)