On Sun, 2023-08-27 at 16:33 +0300, Eli Zaretskii wrote:
> That error code 2 means file not found, and -1 means a command was
> not found or completely failed to run.  It is easy to show a couple
> of examples for each one, we see those every day.

That might be true in Windows but it's not the case in POSIX systems:

$ make
make: foobar: No such file or directory
make: *** [Makefile:3: all] Error 127

And, even 127 is just a convention which is adopted by some shells;
there's no reason why a program couldn't exit with that code as well
for example.

As for -1, that's not a valid POSIX error code.

It's true that "2" is the exit code for a shell if it fails to parse
the shell script due to a syntax error or something; maybe that's worth
mentioning.

-- 
Paul D. Smith <psm...@gnu.org>            Find some GNU make tips at:
https://www.gnu.org                       http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad
Scientist

Reply via email to