From d55562c94d82d982729daa9a0f91ce71c1c8020b Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jackpot51@gmail.com>
Date: Wed, 12 Jul 2017 18:52:58 -0600
Subject: [PATCH] Fix Redox build

---
 src/builtins/mod.rs      | 3 ++-
 src/shell/job_control.rs | 9 +++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/builtins/mod.rs b/src/builtins/mod.rs
index 7887fbf4..b9b772ae 100644
--- a/src/builtins/mod.rs
+++ b/src/builtins/mod.rs
@@ -30,8 +30,9 @@ fn exit_builtin() -> Builtin {
         name: "exit",
         help: "To exit the curent session",
         main: Box::new(|args: &[&str], shell: &mut Shell| -> i32 {
+            let previous_status = shell.previous_status;
             shell.exit(args.get(1).and_then(|status| status.parse::<i32>().ok())
-                .unwrap_or(shell.previous_status))
+                .unwrap_or(previous_status))
         }),
     }
 }
diff --git a/src/shell/job_control.rs b/src/shell/job_control.rs
index d8bac210..b975b892 100644
--- a/src/shell/job_control.rs
+++ b/src/shell/job_control.rs
@@ -256,7 +256,11 @@ impl<'a> JobControl for Shell<'a> {
     }
 
     #[cfg(target_os = "redox")]
-    fn watch_foreground(&mut self, pid: u32) -> i32 {
+    fn watch_foreground <F: Fn() -> String> (
+        &mut self,
+        pid: u32,
+        _get_command: F
+    ) -> i32 {
         use std::io::{self, Write};
         use std::os::unix::process::ExitStatusExt;
         use std::process::ExitStatus;
@@ -345,7 +349,8 @@ impl<'a> JobControl for Shell<'a> {
     }
 
     #[cfg(target_os = "redox")]
-    fn handle_signal(&self, _: i32) {
+    fn handle_signal(&self, _: i32) -> bool {
         // TODO: Redox doesn't support signals yet;
+        false
     }
 }
-- 
GitLab