[Bug 3531] New: Ssh will not exit when it receives SIGTERM before calling poll in client_wait_until_can_do_something until some events happen.

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Wed Feb 1 13:16:41 AEDT 2023


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

            Bug ID: 3531
           Summary: Ssh will not exit when it receives SIGTERM before
                    calling poll in client_wait_until_can_do_something
                    until some events happen.
           Product: Portable OpenSSH
           Version: 9.1p1
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: ssh
          Assignee: unassigned-bugs at mindrot.org
          Reporter: rmsh1216 at 163.com

In general, ssh will call poll in client_wait_until_can_do_something to
wait for poll events with setting timeout to -1. When ssh receives
SIGTERM before poll, it will not exit as expected until some events
happen or receiving new signals.

client_loop
    client_wait_until_can_do_something
                                 <--------- SIGTERM 
                                 -> signal_handler()
        poll() // wait for events and never exit as expected

In my opinion, when SIGTERM is received, ssh should not continue to
call the poll(), or call poll() with setting timeout to -1.

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


More information about the openssh-bugs mailing list