_c_exit

From RAD Studio
Jump to: navigation, search

Go Up to process.h Index


Header File

process.h

Category

Process Control Routines

Prototype

void _c_exit(void);

Description

Performs _exit cleanup without terminating the program.

_c_exit performs the same cleanup as _exit, except that it does not terminate the calling process.

Return Value

None.

Example

 #include <process.h>
 #include <io.h>
 #include <fcntl.h>
 #include <stdio.h>
 main()
 {
 int fd;
 char c;
 
 if ((fd = open("_c_exit.c",O_RDONLY)) < 0)
 {
 printf("Unable to open _c_exit.c for reading\n");
 return 1;
 }
 if (read(fd,&c,1) != 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);
 _c_exit();
 if (read(fd,&c,1) != 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);
 return 0;
 }

Portability

POSIX Win32 ANSI C ANSI C++

+

See Also

Retrieved from "https://docwiki.embarcadero.com/RADStudio/Athens/e/index.php?title=C_exit&oldid=251449"