[Bug 2091] scp hangs while copying a large file and being executed as a background process ( with nohup )

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Wed Feb 12 04:23:00 AEDT 2020


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

Yuuki Harano <masm+bugzilla at masm11.me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |masm+bugzilla at masm11.me

--- Comment #8 from Yuuki Harano <masm+bugzilla at masm11.me> ---
I don't know about Korn Shell. However, if it sends SIGHUP to jobs when
termination, then the bug is reproducible with zsh on Linux.
So, I debugged.

1. nohup executes scp with SIGHUP is SIG_IGN.
2. scp forks and executes ssh with SIGHUP is SIG_IGN.
3. scp sets up SIGHUP as its own handler, while ssh doesn't because it
is SIG_IGN.
4. transfer starts.
5. logout.
6. shell sends SIGHUP to scp and ssh. (*1)
7. in scp, the specified signal handler is called. in ssh, SIGHUP is
ignored.
8. in the signal handler in scp, it sends SIGHUP to ssh.
9. ssh ignores the SIGHUP too.
10. scp waits for ssh to exit in the signal handler, so it doesn't send
data to ssh.

(*1) please configure your shell to send SIGHUP to jobs when shell's
termination,
otherwide that doesn't happen.

8.1p1.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.


More information about the openssh-bugs mailing list