1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-11 03:27:05 +03:00

Add comment

This commit is contained in:
Benoit de Chezelles 2021-02-18 00:54:38 +01:00 committed by Wez Furlong
parent 18e8d48171
commit dc9784e0db

View File

@ -190,6 +190,11 @@ impl Child for std::process::Child {
fn kill(&mut self) -> IoResult<()> {
#[cfg(unix)]
{
// On unix, we send the SIGHUP signal instead of trying to kill
// the process. The default behavior of a process receiving this
// signal is to be killed unless it configured a signal handler.
// In this case the process is responsible of itself, releasing
// resources and terminating itself, or become a daemon.
unsafe { libc::kill(self.id() as i32, libc::SIGHUP) };
Ok(())
}