bug-m4
[Top][All Lists]
Advanced

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

GNU M4 1.4.3 exit status


From: John Gatewood Ham
Subject: GNU M4 1.4.3 exit status
Date: Sun, 9 Oct 2005 03:07:04 +0700 (ICT)

GNU m4 people,

When invoking m4 if you specify a file that does not exist
the return code when exiting is still 0 but you have an error
message.  The man page shows that you will exit with 0
only if there are no errors.  I am using version 1.4.3
compiled from source.

Example (no file bogus.m4 exists, using bash 3.0):

m4 bogus.m4 >bogus
if (($?!=0))
then
  echo error
else
  echo ok
fi

will output this:

m4: bogus.m4: No such file or directory
ok

It should output this:

m4: bogus.m4: No such file or directory
error

From the man page:
"EXIT STATUS
       The following exit values shall be returned:

        0     Successful completion.

       >0     An error occurred"

I could not find what the exit status should be in the
info file at all; searching only turned up hits for
sysval related things and m4exit, neither of which
tells what m4 will return when it has an error.

If a missing file generates a message but is not an error,
then this should be either documented or fixed.

The README file says send bugs to address@hidden,
but the web page here http://www.seindal.dk/rene/gnu/feedback.htm
says send them to address@hidden

I sent it to both places to be sure.  I hope at least one
of the addresses was the correct place to send this bug report.

Thank you,

JGH





reply via email to

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