dont spin at max speed when waiting for foreground process
Signed-off-by: Ava Hahn <ava@sunnypup.io>
This commit is contained in:
parent
e042cd1152
commit
5dcf601384
2 changed files with 7 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ use {
|
|||
env::set_current_dir,
|
||||
os::unix::process::CommandExt,
|
||||
mem,
|
||||
thread,
|
||||
time::Duration,
|
||||
},
|
||||
nix::{
|
||||
unistd, unistd::Pid,
|
||||
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue