Skip to content

Commit

Permalink
Preserve inherited mode flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimcn committed Dec 8, 2016
1 parent cc16122 commit 6404143
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bootstrap/job.rs
Expand Up @@ -123,7 +123,8 @@ pub unsafe fn setup() {
// during startup or terminating abnormally). This is important for running tests,
// since some of them use abnormal termination by design.
// This mode is inherited by all child processes.
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
let mode = SetErrorMode(SEM_NOGPFAULTERRORBOX); // read inherited flags
SetErrorMode(mode | SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);

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

0 comments on commit 6404143

Please sign in to comment.