Sun Studio 12: Fortran Library Reference

1.4.9 exit: Terminate a Process and Set the Status

The subroutine is called by:

call exit( status )




Example: exit():

       if(dx .lt. 0.) call exit( 0 )

exit flushes and closes all the files in the process, and notifies the parent process if it is executing a wait.

status should be in the range of 0–255. This call will never return.

The C function exit can cause cleanup actions before the final system ’exit’.

Calling exit without an argument causes a compile-time warning message, and a zero will be automatically provided as an argument. See also: exit(2), fork(2), fork(3F), wait(2), wait(3F).