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

Re: Help please!!



Arun Sharma forced the electrons to say:
> 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.

Hi Arun,

I didn't get this.

Consider the following:

int main (void) {
   exit (3);
   return 100;
}

Do you mean to say that this program will fetch me a return value of 100? I
doubt it.

IIRC, the return value of main and any exit() call are synonymous. The startup
code treats these two cases the same.

Please explain.

Binand

-- 
The prompt for all occasions:
export PS1="F:\$(pwd | tr '/[a-z]' '\134\134[A-Z]')> "
--------------- Binand Raj S. (binand@xxxxxxxxxxxxxxxxxxxxx)