about summary refs log tree commit diff
path: root/src/libstd/sys/cloudabi
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2018-03-03 18:29:30 -0800
committerScott McMurray <scottmcm@users.noreply.github.com>2018-03-03 18:44:44 -0800
commit74c5c6e6cb0425284f57fece6fbf248e827ea06d (patch)
treed6c4863688aedf2527b3fa2dd806704b5ae0c33e /src/libstd/sys/cloudabi
parent2ce2b40ee5f847f02d6da1b81f3303b8e8b23531 (diff)
downloadrust-74c5c6e6cb0425284f57fece6fbf248e827ea06d.tar.gz
rust-74c5c6e6cb0425284f57fece6fbf248e827ea06d.zip
Move process::ExitCode internals to sys
Now begins the saga of fixing compilation errors on other platforms...
Diffstat (limited to 'src/libstd/sys/cloudabi')
-rw-r--r--src/libstd/sys/cloudabi/shims/process.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstd/sys/cloudabi/shims/process.rs b/src/libstd/sys/cloudabi/shims/process.rs
index 52e8c82e2b2..fcd40c15c17 100644
--- a/src/libstd/sys/cloudabi/shims/process.rs
+++ b/src/libstd/sys/cloudabi/shims/process.rs
@@ -126,6 +126,18 @@ impl fmt::Display for ExitStatus {
     }
 }
 
+#[derive(PartialEq, Eq, Clone, Copy, Debug)]
+pub struct ExitCode(bool);
+
+impl ExitCode {
+    pub const SUCCESS: ExitCode = ExitCode(false);
+    pub const FAILURE: ExitCode = ExitCode(true);
+
+    pub fn as_i32(&self) -> i32 {
+        self.0 as i32
+    }
+}
+
 pub struct Process(Void);
 
 impl Process {