Rechercher une page de manuel
on_exit
Langue: ja
Version: 1993-04-02 (mandriva - 01/05/08)
Section: 3 (Bibliothèques de fonctions)
名前
on_exit - プロセスが正常に終了した際に呼ばれる関数を登録する書式
#include <stdlib.h> int on_exit(void (*function)(int , void *), void *arg);
説明
on_exit() 関数は、指定された関数 function を、プロセスが 正常に終了した際に呼ばれる関数として登録する。正常な終了とは、 exit(3) またはプログラムの main() 関数の中の return 命令による終了である。 関数 function には、 exit(3) に渡された引数と on_exit() の arg 引数が渡される。返り値
on_exit() 関数は、成功したら 0 を、そうでなければ 0 以外を返す。準拠
この関数は SunOS 4 由来であるが、libc4, libc5, glibc にも存在する。 Solaris (SunOS 5) にはもはや存在しない。 この関数の使用は避け、代わりに標準の atexit(3) を使うこと。関連項目
_exit(3), atexit(3), exit(3)Contenus ©2006-2023 Benjamin Poulain
Design ©2006-2023 Maxime Vantorre