Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
OK from manpages. Don't forget to bump the .Dd of the man page when you commit this content change.
usr.bin/env/env.c | ||
---|---|---|
126 ↗ | (On Diff #63917) | I think maybe this should call exit(), perhaps with a non-zero exit, perhaps with 125 instead. |
usr.bin/env/env.c | ||
---|---|---|
126 ↗ | (On Diff #63928) | what's a 125? |
125 is the exit code used by genv. See https://github.com/coreutils/coreutils/blob/master/src/env.c#L899-L903 and https://github.com/coreutils/coreutils/blob/master/src/system.h#L90 Copying the coreutils exit codes seems to be what is currently happening based on the 126 and 127 exit codes. SYSEXITS(3) does say "According to style(9), it is not a good practice to call exit(3) with arbitrary values to indicate a failure condition when ending a program. Instead, the pre-defined exit codes from sysexits should be used, so the caller of the process can get a rough estimation about the failure class without looking up the source code." If SYSEXIT(3)/STYLE(9) is what we want to follow, then exit code 64 makes the most sense to me.
It would be better to put
#define EXIT_CANCELED 125
and use that instead of the bare 125. I know we have other numbers elsewhere, but that's a good place to make this not a magic number.
These look good to me.
Thanks for integrating my feedback.
usr.bin/env/env.1 | ||
---|---|---|
34 ↗ | (On Diff #63948) | date :) |