| d5e5e241 | 29-May-2025 |
Kyle Evans <kevans@FreeBSD.org> |
mail: tests: reset signal disposition before testing
As a good citizen of the OS, mail(1) won't try to catch signals that were ignored when it started and it won't reconfigure its signal mask unless
mail: tests: reset signal disposition before testing
As a good citizen of the OS, mail(1) won't try to catch signals that were ignored when it started and it won't reconfigure its signal mask unless it's going to try and handle a signal. The test should start mail(1) off in a well-known state for the signal that it's trying to test in order to get the behavior that's desired.
No functional change, just improves the resilience of the test.
Reviewed by: des Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D50599
show more ...
|
| 964557fe | 14-May-2025 |
Kyle Evans <kevans@FreeBSD.org> |
mail: exit with the correct exit status on SIGHUP in send mode
Motivated by POSIX conformance requirements: mailx(1) is expected to take the default action for every signal except SIGINT in interact
mail: exit with the correct exit status on SIGHUP in send mode
Motivated by POSIX conformance requirements: mailx(1) is expected to take the default action for every signal except SIGINT in interactive mode. We still handle other signals that we shouldn't based on the spec (e.g., SIGTSTP), but conforming there is not as straightforward as we do more than just cleanup in response.
Note that when the spec says that we must take the default action, it does not mean so strictly. Namely, we *can* do some sensible cleanup if we'd like, but we enter into nonconformant territory if we don't reflect the termination via signal in our exit status. That is why this change doesn't actually remove the handler; we're still conformant as long as the end result is the same as if we took the default action.
Reviewed by: des Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D50251
show more ...
|