diff --git a/Readme.org b/Readme.org index 7471c66..04781a0 100644 --- a/Readme.org +++ b/Readme.org @@ -1,4 +1,3 @@ - #+Title: Relish: Rusty Expressive LIsp SHell #+Author: Ava Hahn @@ -155,9 +154,8 @@ Note: this section only tracks the state of incomplete TODO items. Having everyt ** DONE Beta tasks (See tag: v0.3.0) ** TODO v1.0 tasks -- set library -- Can pass args to relish scripts (via interpreter) - Can pass args to relish scripts (via command line) +- Can pass args to relish scripts (via interpreter) - finish basic goals in the [[file:snippets/interactive-devel.rls][interactive development library]] - Release CI - Rename to Flesh @@ -167,7 +165,6 @@ Note: this section only tracks the state of incomplete TODO items. Having everyt - finish stretch goals in the [[file:snippets/interactive-devel.rls][interactive development library]] - History length configurable (env var?) - Lex function -- Read function (Input + Lex) - execute configurable function on cd - Post to relevant channels - Implement Compose for lambdas diff --git a/src/stl/posix.rs b/src/stl/posix.rs index de637d0..0257fad 100644 --- a/src/stl/posix.rs +++ b/src/stl/posix.rs @@ -50,6 +50,8 @@ use { env::set_current_dir, os::unix::process::CommandExt, mem, + thread, + time::Duration, }, nix::{ unistd, unistd::Pid, @@ -216,7 +218,7 @@ fn launch_command( } // the analogous make_background happens in the app when the user sends it the corresponding signal -fn make_foreground(pid: u32, state: &mut ShellState) -> Result<(), String>{ +fn make_foreground(pid: u32, state: &mut ShellState) -> Result<(), String> { for i in &mut state.children { if i.id() == pid { let pid_fancy = Pid::from_raw(pid as i32); @@ -253,6 +255,9 @@ fn make_foreground(pid: u32, state: &mut ShellState) -> Result<(), String>{ .unwrap_or(-1); break; + } else { + // sleep 1 sec + thread::sleep(Duration::from_millis(1000)); } }, Err(e) => {