exit

Causes the NLM to terminate normally.

Library:LibC
Classification:ANSI
Service:General C Services

Syntax

  #include <stdlib.h> 
   
  void exit (
     int   status); 
  

Parameters

status

(IN) Specifies the NLM’s status at exit.

Remarks

The exit function causes a normal termination consisting of the following sequence of events:

  • The atexit functions, registered with the atexit function, are executed in “last-in, first-out” order.

  • Cleanup code registered with the NXVmRegisterExitHandler function is called.

  • All threads in the NLM are destroyed.

  • All libraries that the NLM has used as a client are notified of the shutdown via the register library cleanup routines.

  • All other resources allocated by the NLM are freed.

  • The NLM is unloaded.

See Also