about summary refs log tree commit diff
path: root/src/libstd/old_io/process.rs
diff options
context:
space:
mode:
authorSébastien Marie <semarie@users.noreply.github.com>2015-02-16 13:53:46 +0100
committerSébastien Marie <semarie@users.noreply.github.com>2015-02-16 13:53:46 +0100
commit5a6ea7a0716e9b6e10655b62d893a973b7c43ad8 (patch)
tree63faee662879145f0323f57c12b27a8f36b5ef61 /src/libstd/old_io/process.rs
parentc5db290bf6df986a6acd5ce993f278c18e55ca37 (diff)
downloadrust-5a6ea7a0716e9b6e10655b62d893a973b7c43ad8.tar.gz
rust-5a6ea7a0716e9b6e10655b62d893a973b7c43ad8.zip
change the signal used to test signal_reported_right
The test "signal_reported_right" send a signal `1` to `/bin/sh`, and check
the status code to check if the signal is reported right.

Under OpenBSD, the signal `1` (`SIGHUP`) is catched by `/bin/sh`,
resulting the test failed.

Use the uncatchable signal `9` (`SIGKILL`) for test.
Diffstat (limited to 'src/libstd/old_io/process.rs')
-rw-r--r--src/libstd/old_io/process.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/old_io/process.rs b/src/libstd/old_io/process.rs
index 195d33c41a6..09a0deec9c9 100644
--- a/src/libstd/old_io/process.rs
+++ b/src/libstd/old_io/process.rs
@@ -800,12 +800,12 @@ mod tests {
     #[cfg(all(unix, not(target_os="android")))]
     #[test]
     fn signal_reported_right() {
-        let p = Command::new("/bin/sh").arg("-c").arg("kill -1 $$").spawn();
+        let p = Command::new("/bin/sh").arg("-c").arg("kill -9 $$").spawn();
         assert!(p.is_ok());
         let mut p = p.unwrap();
         match p.wait().unwrap() {
-            process::ExitSignal(1) => {},
-            result => panic!("not terminated by signal 1 (instead, {})", result),
+            process::ExitSignal(9) => {},
+            result => panic!("not terminated by signal 9 (instead, {})", result),
         }
     }