Control-c not work under openssh?
Gert Doering
gert at greenie.muc.de
Fri Aug 25 05:51:48 EST 2000
Hi,
On Thu, Aug 24, 2000 at 09:04:37AM -0700, Garrick James wrote:
> I've noticed something interesting, though. The presence of the bug's
> symptom is dependant on the state of control-c functionality at the time
> that sshd is started on the server. If control-c is working in the
> controlling terminal from which sshd is started, then control-c will work
> in all client connections. If control-c is not working at server daemon
> startup time, then clients do not get a working control-c.
Now that's a VERY good hint. It means, most likely, that the signal()
handling for SIGINT is broken - it sounds ike "if sshd inherits a 'SIG_IGN'
setting at startup, this will be passed to all children, which will ignore
SIGINT as well".
If that assumption is correct, it would sufficient to do
signal( SIGINT, SIG_DFL );
somewhere early in the sshd startup phase.
... just browsing through the code without really trying to find the
"ideal" spot, I'd suggest the following experiment. In "session.c",
about line 420 (2.1.1p4 here), you'll find the following code:
/* Fork the child. */
if ((pid = fork()) == 0) {
/* Child. Reinitialize the log since the pid has changed. */
log_init(__progname, options.log_level, options.log_facility, lo
g_stderr);
/*
* Create a new session and process group since the 4.4BSD
* setlogin() affects the entire process group.
*/
put the signal(SIGINT, SIG_DFL) in between those lines, after the log_init,
recompile, and see what happens...
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany gert at greenie.muc.de
fax: +49-89-35655025 gert.doering at physik.tu-muenchen.de
More information about the openssh-unix-dev
mailing list