bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fix for yet another minor nohup POSIX glitch


From: Paul Eggert
Subject: fix for yet another minor nohup POSIX glitch
Date: Fri, 22 Apr 2005 23:06:02 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

I installed this:

2005-04-22  Paul Eggert  <address@hidden>

        * src/nohup.c (main): If getopt fails, exit with status 127,
        not status 1.  POSIX requires this.
        * NEWS: Document this.

--- NEWS        22 Apr 2005 23:51:34 -0000      1.277
+++ NEWS        23 Apr 2005 06:01:50 -0000      1.278
@@ -17,6 +17,8 @@ GNU coreutils NEWS                      
 
     nohup now closes stderr if it is a terminal and stdout is closed.
 
+    nohup now exits with status 127 (not 1) when given an invalid option.
+
   pathchk changes:
 
     It now rejects the empty name in the normal case.  That is,
--- src/nohup.c 11 Apr 2005 20:08:30 -0000      1.22
+++ src/nohup.c 23 Apr 2005 05:57:33 -0000      1.23
@@ -88,7 +88,7 @@ main (int argc, char **argv)
   parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
                      usage, AUTHORS, (char const *) NULL);
   if (getopt_long (argc, argv, "+", NULL, NULL) != -1)
-    usage (EXIT_FAILURE);
+    usage (NOHUP_FAILURE);
 
   if (argc <= optind)
     {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]