Guaranteed remote process termination

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I'm using ssh for launching and communicating with remote processes,
and I want the remote process to terminate whenever ssh terminated
(say SIGTERM or even SIGKILL) or connection dropped.

Currently, the quit mechanism is based on catching EOF in stdin and
write errors in stdout. Is that good enough? Do I still need to trap
particular signal like SIGHUP?

And is it possible that the remote sshd process will hang and pipes
will not be closed and the remote process will get blocked

Jianshi Huang

Site Timeline