V
@Random832 said:@Vanders said:If the value of status is zero or EXIT_SUCCESS, an implementation-defined ... is returned. If the value of status is EXIT_FAILURE, an implementation-defined ... is returned. Otherwise the status returned is implementation-defined.
So, when is it not implementation-defined?You've cut the important bits from the quote. When exit() is called with 0 OR EXIT_SUCCESS, the implementation should inform the system that the application has exited successfully. When exit() is called with EXIT_FAILURE, the implementation should inform the system that the application has exited but something was wrong. If exit() is called with any other value besides, 0, EXIT_SUCCESS or EXIT_FAILURE, it's upto the implementation (& the system) what happens: maybe calling exit() with a value of 461 will cause all of your user processes to be suspended? The standard doesn't say.