HomeFreeBSD

Add a knob to not drop signal with default ignored or ignored actions

Description

Add a knob to not drop signal with default ignored or ignored actions

Traditionally, BSD drops signals with the default action during send,
not even putting them to the destination process queue. This semantic
is not shared with other operating systems (Linux), which do queue
such signals. In particular, sigtimedwait(2) and related syscalls can
observe the delivery.

Add a global knob kern.sig_discard_ign which can be set to false to force
enqueuing of the signals with default action. Also add an ABI flag to
indicate that signals should be queued.

Note that it is not practical to run with the knob turned on, because almost
all software that care about the delivery of such signals, is aware of the
difference, and misbehaves if the signals are actually queued. The purpose
of the knob as is is to allow for easier diagnostic of the programs that
need the adjustments, to confirm the cause of problem.

Reported by: dchagin
Reviewed by: dchagin, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D30675

Details

Provenance
kibAuthored on Jun 5 2021, 12:42 PM
Reviewer
dchagin
Differential Revision
D30675: Fix two issues with Linuxolator signals
Parents
rGacced8b043c5: sigwait: add comment explaining EINTR/ERESTART details
Branches
Unknown
Tags
Unknown