libhbsdcontrol: functions can hard exit rather than return control to the caller
The functions within libhbsdcontrol can hard exit rather than return an error to the caller. I think a hard exit makes sense for application code, but for library code it's not what I'd usually expect. So far I have worked around this by catching error conditions before I call libhbsdcontrol functions but it's not ideal. It seems like a common pattern within libhbsdcontrol. An isolated example:
#include <libhbsdcontrol.h>
int
main()
{
hbsdcontrol_set_feature_state("/does/not/exist", "mprotect", 1);
}
Result:
$ cc -lhbsdcontrol test.c -o testx
$ ./testx
hbsdcontrol_extattr_set_attr: No such file or directory
testx: abort