Bug 1156 - Closes connection after C-c is pressed on QNX
Summary: Closes connection after C-c is pressed on QNX
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 4.3p2
Hardware: ix86 Other
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_4_4
  Show dependency treegraph
 
Reported: 2006-02-14 03:30 AEDT by Matt Kraai
Modified: 2006-09-28 19:25 AEST (History)
0 users

See Also:


Attachments
Define SSHD_ACQUIRES_CTTY on QNX (834 bytes, patch)
2006-02-15 02:35 AEDT, Matt Kraai
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Kraai 2006-02-14 03:30:12 AEDT
When I press Control-C while running a command (e.g., sleep 1) on QNX 6, after the command finishes, the connection is closed:

> $ qnx18
> Welcome to QNX Neutrino!
> sh: j_init: tcgetpgrp() failed: Inappropriate I/O control operation
> sh: warning: won't have full job control
> Mon Feb 13 08:23:04 2006 on /dev/ttyp3
> Last login: Mon Feb 13 08:21:32 2006 on /dev/ttyp2
> $ sleep 1              # I pressed C-c here.
> Connection to qnx18 closed by remote host.
> Connection to qnx18 closed.

When I run sshd -d, pressing C-c kills sleep but does not cause the connection to close.

I used the 20060213 snapshot.
Comment 1 Darren Tucker 2006-02-14 06:47:54 AEDT
Please try each of:
./configure --with-cflags=-DSSHD_ACQUIRES_CTTY
check_for_openpty_ctty_bug=1 ./configure

If it's the former, then see bug #245 for an explanation.
Comment 2 Matt Kraai 2006-02-15 02:35:41 AEDT
Created attachment 1066 [details]
Define SSHD_ACQUIRES_CTTY on QNX

Defining SSHD_ACQUIRES_CTTY fixes the problem, so the attached patch makes configure do so on QNX.
Comment 3 Darren Tucker 2006-02-15 07:27:08 AEDT
Cool, thanks.  Adding to the list for the next release.
Comment 4 Darren Tucker 2006-02-26 12:33:10 AEDT
Patch applied, thanks.  It will be in the 4.4 release.
Comment 5 Darren Tucker 2006-09-28 19:25:47 AEST
With the release of 4.4, we believe that this bug is now closed.  For information about the release please see http://www.openssh.com/txt/release-4.4 .