Man page - on_exit(3)

Packages contains this manual

Available languages:

en fr es cs ja ru ro de

Manual

on_exit

JMÉNO
KNIHOVNA
POUŽITÍ
POPIS
NÁVRATOVÉ HODNOTY
ATRIBUTY
STANDARDY
HISTORIE
CAVEATS
DALŠÍ INFORMACE
PŘEKLAD

JMÉNO

on_exit - registruje funkci, která se má vyvolat při ukončení procesu

KNIHOVNA

Standardní knihovna C ( libc , -lc )

POUŽITÍ

#include <stdlib.h>

int on_exit(void (* function )(int, void *), void * arg );

Požaduje množinu testovacích maker pro glibc (viz feature_test_macros (7)):

on_exit ():
Od glibc 2.19:
_DEFAULT_SOURCE
glibc 2.19 a dřívější:
_BSD_SOURCE || _SVID_SOURCE

POPIS

The on_exit () function registers the given function to be called at normal process termination, whether via exit (3) or via return from the program’s main (). The function is passed the status argument given to the last call to exit (3) and the arg argument from on_exit ().

The same function may be registered multiple times: it is called once for each registration.

When a child process is created via fork (2), it inherits copies of its parent’s registrations. Upon a successful call to one of the exec (3) functions, all registrations are removed.

NÁVRATOVÉ HODNOTY

Funkce on_exit () vrací hodnotu 0, byla-li úspěšná, jinak vrací nenulovou hodnotu.

ATRIBUTY

Vysvětlení pojmů použitých v této části viz attributes (7).

Image grohtml-4130282-1.png

STANDARDY

None.

HISTORIE

SunOS 4, glibc. Removed in Solaris (SunOS 5). Use the standard atexit (3) instead.

CAVEATS

By the time function is executed, stack ( auto ) variables may already have gone out of scope. Therefore, arg should not be a pointer to a stack variable; it may however be a pointer to a heap variable or a global variable.

DALŠÍ INFORMACE

_exit (2), atexit (3), exit (3)

PŘEKLAD

Překlad této příručky do češtiny vytvořili Pavel Heimlich <tropikhajma@gmail.com>

Tento překlad je bezplatná dokumentace; Přečtěte si GNU General Public License Version 3 nebo novější ohledně podmínek autorských práv. Neexistuje ŽÁDNÁ ODPOVĚDNOST.

Pokud narazíte na nějaké chyby v překladu této příručky, pošlete e-mail na adresu translation-team-cs@lists.sourceforge.net .