about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-08-20 20:29:08 +0000
committerbors <bors@rust-lang.org>2017-08-20 20:29:08 +0000
commit8c303ed8799edb0ea76d681a6ee97f7ef9f8f2a1 (patch)
tree07ed434fcade4cf12cdaf256726a5ac23654cb28 /src/libstd
parentc1111dfcac63e86b26942f6096ed2cb43d888a2e (diff)
parenta41c4f80d9e92bd34b293a4a817092c420276d82 (diff)
downloadrust-8c303ed8799edb0ea76d681a6ee97f7ef9f8f2a1.tar.gz
rust-8c303ed8799edb0ea76d681a6ee97f7ef9f8f2a1.zip
Auto merge of #44000 - ids1024:redox-exec-error, r=alexcrichton
redox: Correct error on exec when file is not found

`.raw_os_error()` (called in `spawn()`) returned None, so this produced an incorrect error.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/sys/redox/process.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sys/redox/process.rs b/src/libstd/sys/redox/process.rs
index 17fa07b99ae..d87364b8121 100644
--- a/src/libstd/sys/redox/process.rs
+++ b/src/libstd/sys/redox/process.rs
@@ -336,7 +336,7 @@ impl Command {
                 panic!("return from exec without err");
             }
         } else {
-            io::Error::new(io::ErrorKind::NotFound, "")
+            io::Error::from_raw_os_error(syscall::ENOENT)
         }
     }