Fix issue with variable not passed to daemon

This commit is contained in:
Jeremy Soller
2017-02-07 20:39:07 -07:00
parent 880c664a24
commit b1e0ae8722
+2 -2
View File
@@ -22,7 +22,7 @@ fn set_tty(tty: &str) -> syscall::Result<()> {
Ok(())
}
fn daemon() {
fn daemon(clear: bool) {
loop {
if clear {
syscall::write(1, b"\x1Bc").unwrap();
@@ -74,7 +74,7 @@ pub fn main() {
}
if unsafe { syscall::clone(0).unwrap() } == 0 {
daemon();
daemon(clear);
}
} else {
panic!("getty: no tty provided");