summaryrefslogtreecommitdiff
path: root/src/nohup.sh
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-05-12 22:38:58 +0000
committerJim Meyering <jim@meyering.net>2000-05-12 22:38:58 +0000
commit30c412049f52fdb43917b0a1aecc00e7e28ec2a2 (patch)
treee8108e619cef22f396104b6437173769a38cd1d3 /src/nohup.sh
parentf2d53500ae169c872eb7ef7193eaec31f7aa3042 (diff)
downloadcoreutils-30c412049f52fdb43917b0a1aecc00e7e28ec2a2.tar.xz
Detect and report write failure of --help/--version.
Diffstat (limited to 'src/nohup.sh')
-rwxr-xr-xsrc/nohup.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nohup.sh b/src/nohup.sh
index a7526c4b3..7c183db52 100755
--- a/src/nohup.sh
+++ b/src/nohup.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# nohup -- run a command immume to hangups, with output to a non-tty
-# Copyright (C) 1991, 1997, 1999 Free Software Foundation, Inc.
+# Copyright (C) 1991, 1997, 1999, 2000 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -37,13 +37,14 @@ if [ $# -eq 0 ]; then
exit 1
fi
+fail=0
case $# in
1 )
case "z${1}" in
z--help )
- echo "$usage"; echo "$usage_help"; exit 0 ;;
+ echo "$usage" || fail=1; echo "$usage_help" || fail=1; exit $fail;;
z--version )
- echo "nohup (@GNU_PACKAGE@) @VERSION@"; exit 0 ;;
+ echo "nohup (@GNU_PACKAGE@) @VERSION@" || fail=1; exit $fail;;
* ) ;;
esac
;;