NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

killing `ssh <host> <cmd>' does not kill <cmd> on <host>


when I run a `never ending' command like:

   ssh host tail -f /var/log/maillog.0

CTRL-C-ing ssh after tail has reached the end of maillog.0 does not kill
tail. If tail however suddenly would start to generate output again, it
would die immediately.

This is not that much of a problem if the process just sleeps and does
nothing but there are certain cases where a running script soon will eat
too much memory if not killed immediately.

Here's how `ps aux' on <host> looks like after killing the ssh client:

   petar    9401  0.0  0.7  228   876 ?       Is    3:14PM 0:00.00 ksh -c ksh
   petar   15882  0.0  0.4   44   556 ?       I     3:14PM 0:00.00 tail -f 

Is this desired behaviour? If not, how could one avoid it?



Home | Main Index | Thread Index | Old Index