_c_exit
raw OCR
Perform _exit cleanup without terminating the program.
Defined in header <process.h>
Syntax
#include <process.h>
void _c_exit(void);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ |
Remarks
_c_exit performs the same cleanup as _exit, except that it does not terminate the calling process. Interrupt vectors altered by the startup code are restored; no other cleanup is performed.
Return value
None.
See also
Example
#include <process.h>
#include <io.h>
#include <fcntl.h>
#include <stdio.h>
#include <dos.h>
main(
{
int fd;
char c;
if ((fd = open("_c_exit.c",0_RDONLY)) < 0) {
printf( "Unable to open _c_exit.c for reading\n");
return 1;
}
if (read(fd,&c,l) != 1)
printf ("Unable to read from open file handle %d before _c_exit\n" ,fd);
else
printf ("Successfully read from open file handle %d before _c_exit\n",fd);
printf ("Interrupt zero vector before _c_exit = %Fp\n",_dos_getvect (0));
_c_exit ();
if (read(fd,&c,l) != 1)
printf ("Unable to read from open file handle %d after _c_exit\n", fd);
else
printf ("Successfully read from open file handle %d after _c_exit\n" ,fd);
printf ("Interrupt zero vector after _c_exit = %Fp\n",_dos_getvect (0));
return 0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Extraction notes
- heading `c exit` read as `_c_exit`
Stable link: /3.1/process.h/_c_exit/
· short form /3.1/_c_exit/