_exit
Terminates the NLM without executing atexit functions or flushing buffers
#include <nwthread.h>
void _exit (
int status);
None.
The _exit function causes a normal termination consisting of the following sequence of events:
abort, exit, ExitThread, RegisterLibrary (NDK: Program Management)
#include <nwthread.h>
#include <stdio.h>
int main (int argc, char **argv)
{
FILE *fp;
atexit (myFunction); /* myFunction declared elsewhere */
fp = fopen (argv[1], "r");
if (fp == NULL)
{
fprintf (stderr, Unable to open ’%s’\n, argv[1]);
_exit (1);
}
fclose (fp);
exit (0);
}