Author: jelmer
Date: 2005-09-23 13:06:23 +0000 (Fri, 23 Sep 2005)
New Revision: 10450

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10450

Log:
Use exit code 1 in case of fatal errors

Modified:
   branches/SAMBA_4_0/source/pidl/pidl


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/pidl
===================================================================
--- branches/SAMBA_4_0/source/pidl/pidl 2005-09-23 07:53:58 UTC (rev 10449)
+++ branches/SAMBA_4_0/source/pidl/pidl 2005-09-23 13:06:23 UTC (rev 10450)
@@ -542,7 +542,7 @@
 }
 
 # main program
-GetOptions (
+my $result = GetOptions (
            'help|h|?' => \$opt_help, 
            'outputdir=s' => \$opt_outputdir,
            'dump-idl' => \$opt_dump_idl,
@@ -569,6 +569,10 @@
            'warn-compat' => \$opt_warn_compat
            );
 
+if (not $result) {
+       exit(1);
+}
+
 if ($opt_help) {
     ShowHelp();
     exit(0);
@@ -764,7 +768,7 @@
 
 if (scalar(@ARGV) == 0) {
        print "pidl: no input files\n";
-       exit(0);
+       exit(1);
 }
 
 process_file($_) foreach (@ARGV);

Reply via email to