[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: exit codes from gnu make
From: |
Paul D. Smith |
Subject: |
Re: exit codes from gnu make |
Date: |
Fri, 21 May 2004 11:57:07 -0400 |
%% "Mark Brandyberry" <address@hidden> writes:
mb> The gnu make documentation specifies that only return codes of
mb> 0,1, and 2 will occur. I am currently getting "512" as a return
mb> code for a build I'm doing. Does that make sense, and/or what
mb> would it mean?
It sounds like you're getting the exit code in a program, say from a
waitpid() or similar, and you're not massaging it properly (see the
WIFEXITSTATUS() macro, for example, typically found in the waitpid() man
page).
In the return code from waitpid(), etc., only the least 8 bits of the
code are the exit code of the process; the rest of the value tells you
other things. So if you want the 0, 1, or 2 you have to take only the
least 8 bits.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist