_c_exit
Nach oben zu Process.h - Index
Header-Datei
process.h
Kategorie
Prozesssteuerungsroutinen
Prototyp
void _c_exit(void);
Beschreibung
Führt Aufräumarbeiten durch, ohne das Programm zu beenden.
_c_exit führt dieselben Aufräumarbeiten wie _exit durch, ohne jedoch den aufrufenden Prozess zu beenden.
Rückgabewert
Keiner.
Beispiel
#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;
}
Portabilität
POSIX | Win32 | ANSI C | ANSI C++ |
---|---|---|---|
+ |