HomeFreeBSD

dhclient: Return non-zero status when script exits due to a signal

Description

dhclient: Return non-zero status when script exits due to a signal

r343896 made it such that a non-zero exit status was passed through, but was
still wrong if the script exits on a signal. POSIX does not say what the
WEXITSTATUS macro returns in this case and in practice 0 is a common value.

Instead, translate the wait status into 8 bits the same way as the shell
calculates $?.

Reviewed by: kib, Nash Kaminski
MFC after: 1 week

Details

Committed
jillesFeb 8 2019, 11:03 PM
Reviewer
kib
Parents
rS343921: Add an example to pw.8 about how to add an existing user to a group.
Branches
Unknown
Tags
Unknown