Control-c not work under openssh?
Gert Doering
gert at greenie.muc.de
Fri Aug 25 06:01:13 EST 2000
Hi,
On Thu, Aug 24, 2000 at 09:51:48PM +0200, Gert Doering wrote:
> ... 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:
Wrong place, this is only for no-tty commands, which don't care about
ctrl-c. *oops*.
Next try.... "pty.c", function "pty_make_controlling_tty" (about line
201) is a better bet. Just insert the "signal( SIGINT, SIG_DFL);" line at
the end of the function, right after:
/* Verify that we now have a controlling tty. */
fd = open("/dev/tty", O_WRONLY);
if (fd < 0)
error("open /dev/tty failed - could not set controlling tty: %.100s",
strerror(errno));
else {
close(fd);
}
/* NEW: set ctrl-C signal to "default", which is "abort program" */
sinal( SIGINT, SIG_DFL );
/* end NEW */
}
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