I am going through a text on C . And I came across the following line about exit function but I couldn't understand it completely . Here's the line :
"The argument of exit is available to whatever process called this one , so the success or failure of this program can be tested by another program that uses this one as a sub process "
How is the argument of exit available to the processes that use a program which calls it ? Is it so that exit returns whatsoever value that was provided to it as an argument ?
P.S : On being aware of possible similarities with the following question :
How can I get what my main function has returned?
I would like to say that I am not that deep into C to ascertain that the answers required meet up the demands of the question I posted. Is the value returned by exit same as the one returned by main ? And my question was about how the argument provided to exit in a program is available to any other program which calls the former . Still then , please guide me if the answers in both the places conceptually coincide.