Send a signal to the process. # Errors Returns an error if the signal cannot be sent.
(&self, sig: Signal)
| 745 | /// |
| 746 | /// Returns an error if the signal cannot be sent. |
| 747 | pub fn signal(&self, sig: Signal) -> Result<()> { |
| 748 | let pid = i32::try_from(self.pid).unwrap_or(i32::MAX); |
| 749 | signal::kill(Pid::from_raw(pid), sig).into_diagnostic() |
| 750 | } |
| 751 | |
| 752 | /// Kill the process. |
| 753 | /// |