Bug 1156

Summary: Closes connection after C-c is pressed on QNX
Product: Portable OpenSSH Reporter: Matt Kraai <kraai>
Component: sshdAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: normal    
Priority: P2    
Version: 4.3p2   
Hardware: ix86   
OS: Other   
Bug Depends on:    
Bug Blocks: 1155    
Attachments:
Description Flags
Define SSHD_ACQUIRES_CTTY on QNX none

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 .