[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Help please!!



On Mon, Mar 13, 2000 at 11:55:37AM +0530, Satheesh Kumar. N.K wrote:
> I doubt if the exit() status is same as return value. This prompts me to post
> this question on the list.
> 
> Consider a program whose normal return value is expected to be, say 1.
> The exit status will be 0 indicating that the program terminated normally.
> These two differ. Please correct me if I'm wrong.

Exit status being 0 on normal termination is just a convention. It's up
to the main program to return 0 when it finishes normally. If it returns
100, exit(3) will just return 100. No questions asked.

See the C runtime startup code in glibc for Linux. Specifically, the 
point where the main() returns.

	-Arun