Wait for the process to exit. # Errors Returns an error if waiting fails.
(&mut self)
| 732 | /// |
| 733 | /// Returns an error if waiting fails. |
| 734 | pub async fn wait(&mut self) -> std::io::Result<ProcessStatus> { |
| 735 | let status = self.child.wait().await; |
| 736 | #[cfg(target_os = "linux")] |
| 737 | managed_children::unregister(self.pid); |
| 738 | let status = status?; |
| 739 | Ok(ProcessStatus::from(status)) |
| 740 | } |
| 741 | |
| 742 | /// Send a signal to the process. |
| 743 | /// |