[Bug 3383] New: ssh can not exit when a command is running in backgroup

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Fri Jan 21 01:45:54 AEDT 2022


https://bugzilla.mindrot.org/show_bug.cgi?id=3383

            Bug ID: 3383
           Summary: ssh can not exit when a command is running in
                    backgroup
           Product: Portable OpenSSH
           Version: 8.8p1
          Hardware: amd64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: ssh
          Assignee: unassigned-bugs at mindrot.org
          Reporter: xylene2016 at gmail.com

Openssh version: 8.8p1-git2e5cfed513e84444483baf1d8b31c40072b05103

ssh -vv ip

#situation 1:
# hanging
[root at localhost ~]# sleep 30 >/dev/null 2>&1 & exit
[1] 15494
logout
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow at openssh.com reply
0
debug2: channel 0: rcvd eow
debug2: chan_shutdown_read: channel 0: (i0 o0 sock -1 wfd 4 efd 6
[write])
debug2: channel 0: input open -> closed

#situation 2:
# hanging
[root at localhost ~]# sleep 30 >/dev/null 2>&1 &
[1] 15556
[root at localhost ~]# exit 
logout
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow at openssh.com reply
0
debug2: channel 0: rcvd eow
debug2: chan_shutdown_read: channel 0: (i0 o0 sock -1 wfd 4 efd 6
[write])
debug2: channel 0: input open -> closed

#situation 3:
# This is a normal exit
[root at localhost ~]# exit 
logout
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: chan_shutdown_write: channel 0: (i0 o1 sock -1 wfd 5 efd 6
[write])
debug2: channel 0: output drain -> closed
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow at openssh.com reply
0
debug2: channel 0: rcvd eow
debug2: chan_shutdown_read: channel 0: (i0 o3 sock -1 wfd 4 efd 6
[write])
debug2: channel 0: input open -> closed
debug2: channel 0: rcvd close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
Connection to 45.77.159.33 closed.
Transferred: sent 2992, received 4408 bytes, in 6.0 seconds
Bytes per second: sent 500.1, received 736.8
debug1: Exit status 0

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list