r10450: Use exit code 1 in case of fatal errors
authorJelmer Vernooij <jelmer@samba.org>
Fri, 23 Sep 2005 13:06:23 +0000 (13:06 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:38:47 +0000 (13:38 -0500)
(This used to be commit 88ece24a4400cabef95fd1eb4ca14b7df085b529)

source4/pidl/pidl

index 57105b4472df03551181a8afc230541e26b2cdb6..dc856302417bdb5e649bea9574b1091260fda726 100755 (executable)
@@ -542,7 +542,7 @@ Ethereal parsers:
 }
 
 # main program
-GetOptions (
+my $result = GetOptions (
            'help|h|?' => \$opt_help, 
            'outputdir=s' => \$opt_outputdir,
            'dump-idl' => \$opt_dump_idl,
@@ -569,6 +569,10 @@ GetOptions (
            'warn-compat' => \$opt_warn_compat
            );
 
+if (not $result) {
+       exit(1);
+}
+
 if ($opt_help) {
     ShowHelp();
     exit(0);
@@ -764,7 +768,7 @@ $dcom
 
 if (scalar(@ARGV) == 0) {
        print "pidl: no input files\n";
-       exit(0);
+       exit(1);
 }
 
 process_file($_) foreach (@ARGV);