about summary refs log tree commit diff
path: root/src/libnative/io/process.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-06-04 00:01:40 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-06 23:00:01 -0700
commit75014f7b1790e7ebdf13d38acc04dfdab6e450e9 (patch)
tree46fb046e002a37ba60f6e8b8ef5ee0675fbb7fd8 /src/libnative/io/process.rs
parentd743b8831e6dc5b390af112cc23159d667cf583b (diff)
downloadrust-75014f7b1790e7ebdf13d38acc04dfdab6e450e9.tar.gz
rust-75014f7b1790e7ebdf13d38acc04dfdab6e450e9.zip
libs: Fix miscellaneous fallout of librustrt
Diffstat (limited to 'src/libnative/io/process.rs')
-rw-r--r--src/libnative/io/process.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/libnative/io/process.rs b/src/libnative/io/process.rs
index 8b3f4debe5d..2c2b7cec1de 100644
--- a/src/libnative/io/process.rs
+++ b/src/libnative/io/process.rs
@@ -210,23 +210,23 @@ unsafe fn killpid(pid: pid_t, signal: int) -> IoResult<()> {
             if ret == 0 {
                 Err(super::last_error())
             } else if status != libc::STILL_ACTIVE {
-                Err(io::IoError {
-                    kind: io::OtherIoError,
-                    desc: "process no longer alive",
+                Err(IoError {
+                    code: libc::ERROR_NOTHING_TO_TERMINATE as uint,
+                    extra: 0,
                     detail: None,
                 })
             } else {
                 Ok(())
             }
         }
-        io::process::PleaseExitSignal | io::process::MustDieSignal => {
+        15 | 9 => { // sigterm or sigkill
             let ret = libc::TerminateProcess(handle, 1);
             super::mkerr_winbool(ret)
         }
-        _ => Err(io::IoError {
-            kind: io::OtherIoError,
-            desc: "unsupported signal on windows",
-            detail: None,
+        _ => Err(IoError {
+            code: libc::ERROR_CALL_NOT_IMPLEMENTED as uint,
+            extra: 0,
+            detail: Some("unsupported signal on windows".to_string()),
         })
     };
     let _ = libc::CloseHandle(handle);
@@ -266,10 +266,10 @@ fn spawn_process_os(cfg: ProcessConfig,
     use std::mem;
 
     if cfg.gid.is_some() || cfg.uid.is_some() {
-        return Err(io::IoError {
-            kind: io::OtherIoError,
-            desc: "unsupported gid/uid requested on windows",
-            detail: None,
+        return Err(IoError {
+            code: libc::ERROR_CALL_NOT_IMPLEMENTED as uint,
+            extra: 0,
+            detail: Some("unsupported gid/uid requested on windows".to_str()),
         })
     }