diff --git a/src/context/context.rs b/src/context/context.rs index 34534d8654702739021f95f8df880f8fa8608062..a3ee5d8c4f2531cfd1ff3a4868bda841fbe779cd 100644 --- a/src/context/context.rs +++ b/src/context/context.rs @@ -218,8 +218,6 @@ pub struct Context { /// Tail buffer to use when system call buffers are not page aligned // TODO: Store in user memory? pub syscall_tail: Option<RaiiFrame>, - /// Context is halting parent - pub vfork: bool, /// Context is being waited on pub waitpid: Arc<WaitMap<WaitpidKey, (ContextId, usize)>>, /// Context should handle pending signals @@ -292,7 +290,6 @@ impl Context { syscall: None, syscall_head: Some(RaiiFrame::allocate()?), syscall_tail: Some(RaiiFrame::allocate()?), - vfork: false, waitpid: Arc::new(WaitMap::new()), pending: VecDeque::new(), wake: None, diff --git a/src/syscall/process.rs b/src/syscall/process.rs index bbd82b9707abf9b1648badea82c8597867090820..76b2f7b855b150aff7f23ee1675fd0129834ff2d 100644 --- a/src/syscall/process.rs +++ b/src/syscall/process.rs @@ -112,24 +112,18 @@ pub fn exit(status: usize) -> ! { let mut context = context_lock.write(); if context.ppid == pid { context.ppid = ppid; - context.vfork = false; } } } - let (vfork, children) = { + let children = { let mut context = context_lock.write(); context = empty(&context_lock, context, false); - let vfork = context.vfork; - context.vfork = false; - context.status = context::Status::Exited(status); - let children = context.waitpid.receive_all(); - - (vfork, children) + context.waitpid.receive_all() }; { @@ -137,9 +131,6 @@ pub fn exit(status: usize) -> ! { if let Some(parent_lock) = contexts.get(ppid) { let waitpid = { let mut parent = parent_lock.write(); - if vfork && ! parent.unblock() { - println!("{}: {} not blocked for exit vfork unblock", pid.into(), ppid.into()); - } Arc::clone(&parent.waitpid) }; @@ -151,8 +142,6 @@ pub fn exit(status: usize) -> ! { pid: Some(pid), pgid: Some(pgid) }, (pid, status)); - } else { - println!("{}: {} not found for exit vfork unblock", pid.into(), ppid.into()); } }