Skip to content

Commit 09cb7ec

Browse files
committed
test: Fix signal-exit-status on windows
1 parent fcf9844 commit 09cb7ec

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/libstd/io/process.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ pub enum StdioContainer {
8282
}
8383

8484
/// Describes the result of a process after it has terminated.
85+
/// Note that Windows have no signals, so the result is usually ExitStatus.
8586
#[deriving(Eq)]
8687
pub enum ProcessExit {
8788
/// Normal termination with an exit status.

src/test/run-pass/signal-exit-status.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. this file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-fast
11+
// xfail-fast calling itself doesn't work on check-fast
1212

1313
use std::{os, run};
1414
use std::io::process;
@@ -20,8 +20,10 @@ fn main() {
2020
unsafe { *(0 as *mut int) = 0; }
2121
} else {
2222
let status = run::process_status(args[0], [~"signal"]);
23+
// Windows does not have signal, so we get exit status 0xC0000028 (STATUS_BAD_STACK).
2324
match status {
24-
process::ExitSignal(_) => {},
25+
process::ExitSignal(_) if cfg!(unix) => {},
26+
process::ExitStatus(0xC0000028) if cfg!(windows) => {},
2527
_ => fail!("invalid termination (was not signalled): {:?}", status)
2628
}
2729
}

0 commit comments

Comments
 (0)