I just came across this problem (on Linux, using OpenSSH 2.9.9p2). Run ssh <host> "tail -f <file> | grep <regexp>" Let it connect, and then hit ^C. If you look on <host>, the tail process has been orphaned, but grep, which was its parent, and a direct child of sshd, is gone. It appears that the immediate child of the sshd (grep) is sent a SIGTERM (on line 1983 of session.c, in the function session_close_by_channel()), but its child (tail) never finds out about that death, and stays happily alive. Killing the process group seems to work around the problem, but I haven't actually tried doing that in the code by negating the child's pid in the kill() statement, just killing the process group from the commandline. Is this actually a bug, or is it a desired feature? Thanks, Danek
On Sat, Oct 27, 2001 at 04:37:37PM -0700, Danek Duvall wrote:> I just came across this problem (on Linux, using OpenSSH 2.9.9p2). Run > > ssh <host> "tail -f <file> | grep <regexp>" > > Let it connect, and then hit ^C. If you look on <host>, the tail > process has been orphaned, but grep, which was its parent, and a direct > child of sshd, is gone. > > It appears that the immediate child of the sshd (grep) is sent a SIGTERM > (on line 1983 of session.c, in the function session_close_by_channel()), > but its child (tail) never finds out about that death, and stays happily > alive.the killing has been removed completely. could you please try a recent snapshot from http://www.openssh.com/portable.html thanks, -m
Apparently Analagous Threads
- [Bug 871] New: ''zpool key -l'' core dumped with keysource=hex, prompt and unmatched entered in
- Why openssh newer than 2.9.9 doesn't send SIGTERM and SIGHUP to child process?
- 2007/128 SMF services for Xen
- tsan_interface_java.h; any users? reviving https://github.com/google/java-thread-sanitizer?
- openssh-2.9.9p2 assumes pid_t, uid_t, etc. are not 'long'