Warning: include(__DIR__/SimpleAntiSpam.i18n.php) [function.include]: failed to open stream: No such file or directory in /var/www/html/shared/BaseWiki192/includes/LocalisationCache.php on line 455

Warning: include() [function.include]: Failed opening '__DIR__/SimpleAntiSpam.i18n.php' for inclusion (include_path='/var/www/html/RADStudio/2010/d:/var/www/html/RADStudio/2010/d/includes:/var/www/html/RADStudio/2010/d/languages:shared/:shared/languages:/var/www/html/RADStudio/2010/d:/var/www/html/RADStudio/2010/d/includes:/var/www/html/RADStudio/2010/d/languages:shared/:shared/languages:.:/usr/share/pear:/usr/share/php') in /var/www/html/shared/BaseWiki192/includes/LocalisationCache.php on line 455

Warning: include(__DIR__/SimpleAntiSpam.i18n.php) [function.include]: failed to open stream: No such file or directory in /var/www/html/shared/BaseWiki192/includes/LocalisationCache.php on line 455

Warning: include() [function.include]: Failed opening '__DIR__/SimpleAntiSpam.i18n.php' for inclusion (include_path='/var/www/html/RADStudio/2010/d:/var/www/html/RADStudio/2010/d/includes:/var/www/html/RADStudio/2010/d/languages:shared/:shared/languages:/var/www/html/RADStudio/2010/d:/var/www/html/RADStudio/2010/d/includes:/var/www/html/RADStudio/2010/d/languages:shared/:shared/languages:.:/usr/share/pear:/usr/share/php') in /var/www/html/shared/BaseWiki192/includes/LocalisationCache.php on line 455
_cexit – RAD Studio (Deutsch)

_cexit

Aus RAD Studio (Deutsch)
Wechseln zu: Navigation, Suche

Nach oben zu process.h - Index


Header-Datei

process.h

Kategorie

Prozesssteuerungsroutinen

Prototyp

void _cexit(void);

Beschreibung

Führt Aufräumarbeiten durch, ohne das Programm zu beenden.

_cexit führt dieselben Aufräumarbeiten wie exit durch und schließt alle Dateien, ohne jedoch den aufrufenden Prozess zu beenden. Die Funktion _cexit ruft alle mit atexit registrierten "Exit-Funktionen" auf. Bevor _cexit zurückkehrt, werden alle Ein-/Ausgabepuffer geschrieben und alle geöffneten Streams geschlossen.

Rückgabewert

Keiner.

Beispiel



 #include <windows.h>
 #include <process.h>
 #include <io.h>
 #include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
 void exit_func(void)
 {
   printf("Exit function called\n\n");
   printf("Close Window to return to program... It will beep if able to read from file");
 }
 int main(void)
 {
   int fd;
   char c;
   if ((fd = open("_cexit.c",O_RDONLY)) < 0)
   {
 printf("Unable to open _cexit.c for reading\n");
 return 1;
   }
   atexit(exit_func);
   if (read(fd,&c,1) != 1)
 printf("Unable to read from open file handle %d before _cexit\n",fd);
   else
 printf("Successfully read from open file handle %d before _cexit\n",fd);
   _cexit();
   if (read(fd,&c,1) == 1)
   MessageBeep(0);
   return 0;
 }



Portabilität



POSIX Win32 ANSI C ANSI C++

+

In anderen Sprachen