表示: Delphi
C++
表示設定
_c_exit
提供:RAD Studio XE2
process.h:インデックス への移動
ヘッダーファイル
process.h
カテゴリ
プロセス制御ルーチン
プロトタイプ
void _c_exit(void);
説明
プログラムを終了せずに,_exit によるクリーンアップを実行します。
_c_exit は _exit と同じクリーンアップを実行しますが,呼び出し側のプロセスを終了しない点が異なります。
戻り値
なし。
例
#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; }
移植性
| POSIX | Win32 | ANSI C | ANSI C++ |
|---|---|---|---|
|
+ |