- bookworm-backports 4.25.1-1~bpo12+1
- testing 4.25.1-1
- unstable 4.25.1-1
on_exit(3) | Library Functions Manual | on_exit(3) |
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);
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).
Rozhraní | Atribut | Hodnota |
on_exit() | Zabezpečení vláken | MT-Safe |
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¶
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.
2. května 2024 | Linux man-pages 6.9.1 |