index 5f27eb8..2e76f34 100644 (file)
@@ -109,7 +109,7 @@ int my_getopt(int nargc, char * const *nargv, const char *ostr)
                 (void)fprintf(stderr,
                               "ERROR  : option requires an argument -- %c\n",
                               optopt);
-            return (BADCH);
+            exit (BADCH);
         }
         else                                                   /* white space */
             optarg = nargv[optindex];