diff options
author | Eric Blake <ebb9@byu.net> | 2009-10-23 06:59:23 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-10-23 16:24:08 -0600 |
commit | 1ce9e1e5ca1e7491bccedeeced15470d856c9a22 (patch) | |
tree | b1ff911072e189b2e0b3b84f605353e68fae27ac /tests/misc/nohup | |
parent | b6540b96ba6510af7b2acc6e81bd9d9583f7c96b (diff) | |
download | coreutils-1ce9e1e5ca1e7491bccedeeced15470d856c9a22.tar.xz |
nohup: use EXIT_CANCELED if not POSIXLY_CORRECT
* src/nohup.c (NOHUP_FAILURE): Rename...
(POSIX_NOHUP_FAILURE): ...to this.
(main): Pay attention to POSIXLY_CORRECT, to determine whether to
use status 125 or 127.
* doc/coreutils.texi (nohup invocation): Document this.
* NEWS: Likewise.
* tests/misc/invalid-opt (exit_status): Adjust expected results.
* tests/misc/help-version (expected_failure_status): Likewise.
* tests/misc/nohup: Likewise.
Diffstat (limited to 'tests/misc/nohup')
-rwxr-xr-x | tests/misc/nohup | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/misc/nohup b/tests/misc/nohup index 25a7ca4da..ad04a1cb0 100755 --- a/tests/misc/nohup +++ b/tests/misc/nohup @@ -101,8 +101,11 @@ EOF # Disable these comparisons. Too much variation in 2nd line. # compare exp err || fail=1 -# Make sure it fails with exit status of 127 when given too few arguments. +# Make sure it fails with exit status of 125 when given too few arguments, +# except that POSIX requires 127 in this case. nohup >/dev/null 2>&1 +test $? = 125 || fail=1 +POSIXLY_CORRECT=1 nohup >/dev/null 2>&1 test $? = 127 || fail=1 Exit $fail |