Why openssh newer than 2.9.9 doesn't send SIGTERM and SIGHUP tochild process?
Darren Tucker
dtucker at zip.com.au
Fri Oct 11 21:36:21 EST 2002
Petr Ostadal wrote:
> The problem above can resolve Force pseudo-tty allocation (option -t), but
> it is not ideal solution.
>
> Please, could anyone tell me why the new openssh doesn't send SIGHUP to
> child process if ssh was terminated ?
I don't know why it was removed (in fact, I didn't know about it at all
until I read your message) but I've got an open bug on a similar issue:
http://bugzilla.mindrot.org/show_bug.cgi?id=396
The line you're referring to was removed from session.c between 2.9.9p2
and 3.0 in an OpenBSD sync:
revision 1.153
date: 2001/10/12 01:35:06; author: djm; state: Exp; lines: +11 -18
- (djm) OpenBSD CVS Sync
- markus at cvs.openbsd.org 2001/10/10 22:18:47
[channels.c channels.h clientloop.c nchan.c serverloop.c]
[session.c session.h]
try to keep channels open until an exit-status message is sent.
don't kill the login shells if the shells stdin/out/err is closed.
this should now work:
ssh -2n localhost 'exec > /dev/null 2>&1; sleep 10; exit 5'; echo ?
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
More information about the openssh-unix-dev
mailing list