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

[email protected] <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #4 from [email protected] <[email protected]> ---
My apologies, but looking at committed changes, the fix does not look
correct and it leaves SIGTERM and SIGQUIT signals unblocked.

I admit these signal manipulating functions are a little bit confusing,
but in general signal is blocked if it is set in signal mask. And since
committed fix removes SIGTERM and SIGQUIT from osigset mask, those
signals remain unblocked.

There are currently two variants, how the fix could be approached:

[V1] Used in Solaris specific patch

 + sigaddset(&osigset, SIGTERM);
 + sigaddset(&osigset, SIGQUIT);
  sigprocmask(SIG_SETMASK, &osigset, NULL);
  sighup_restart();

[V2] Proposed by gpt-6

 + sigdelset(&nsigset, SIGTERM);
 + sigdelset(&nsigset, SIGQUIT);
 + sigprocmask(SIG_UNBLOCK, &nsigset, NULL);
 - sigprocmask(SIG_SETMASK, &osigset, NULL);
  sighup_restart();

I would personally prefer V1 which seems more intuitive to me, but I do
not have strong preference.

-- 
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.
_______________________________________________
openssh-bugs mailing list
[email protected]
https://lists.mindrot.org/mailman/listinfo/openssh-bugs

Reply via email to