Serve concurrent terminal sessions with exact teardown
This commit is contained in:
parent
917409fcc6
commit
254bb37764
1 changed files with 278 additions and 51 deletions
|
|
@ -1713,15 +1713,18 @@ impl SessionTerminalProcess for RunscSessionTerminal {
|
|||
}
|
||||
|
||||
fn reap_exec(&mut self) -> io::Result<ProcessExit> {
|
||||
if let Some(exit) = self.exit {
|
||||
return Ok(exit);
|
||||
}
|
||||
let exit = child_broker().reap_status(
|
||||
self.exec
|
||||
.take()
|
||||
.ok_or_else(|| io::Error::other("exec client exit is unavailable"))?,
|
||||
)?;
|
||||
self.exit = Some(exit);
|
||||
let exit = if let Some(exit) = self.exit {
|
||||
exit
|
||||
} else {
|
||||
let exit = child_broker().reap_status(
|
||||
self.exec
|
||||
.take()
|
||||
.ok_or_else(|| io::Error::other("exec client exit is unavailable"))?,
|
||||
)?;
|
||||
self.exit = Some(exit);
|
||||
exit
|
||||
};
|
||||
remove_pid_file(&self.request.internal_pid_file)?;
|
||||
Ok(exit)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue