Skip to content

Commit 6404143

Browse files
committed
Preserve inherited mode flags.
1 parent cc16122 commit 6404143

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bootstrap/job.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ pub unsafe fn setup() {
123123
// during startup or terminating abnormally). This is important for running tests,
124124
// since some of them use abnormal termination by design.
125125
// This mode is inherited by all child processes.
126-
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
126+
let mode = SetErrorMode(SEM_NOGPFAULTERRORBOX); // read inherited flags
127+
SetErrorMode(mode | SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
127128

128129
// Create a new job object for us to use
129130
let job = CreateJobObjectW(0 as *mut _, 0 as *const _);

0 commit comments

Comments
 (0)