.\" -*- coding: UTF-8 -*- '\" t .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified 1993-04-02, David Metcalfe .\" Modified 1993-07-25, Rik Faith (faith@cs.unc.edu) .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH on_exit 3 "2. května 2024" "Linux man\-pages 6.9.1" .SH JMÉNO on_exit \- registruje funkci, která se má vyvolat při ukončení procesu .SH KNIHOVNA Standardní knihovna C (\fIlibc\fP, \fI\-lc\fP) .SH POUŽITÍ .nf \fB#include \fP .P \fBint on_exit(void (*\fP\fIfunction\fP\fB)(int, void *), void *\fP\fIarg\fP\fB);\fP .fi .P .RS -4 Požaduje množinu testovacích maker pro glibc (viz \fBfeature_test_macros\fP(7)): .RE .P \fBon_exit\fP(): .nf Od glibc 2.19: _DEFAULT_SOURCE glibc 2.19 a dřívější: _BSD_SOURCE || _SVID_SOURCE .fi .SH POPIS The \fBon_exit\fP() function registers the given \fIfunction\fP to be called at normal process termination, whether via \fBexit\fP(3) or via return from the program's \fImain\fP(). The \fIfunction\fP is passed the status argument given to the last call to \fBexit\fP(3) and the \fIarg\fP argument from \fBon_exit\fP(). .P The same function may be registered multiple times: it is called once for each registration. .P When a child process is created via \fBfork\fP(2), it inherits copies of its parent's registrations. Upon a successful call to one of the \fBexec\fP(3) functions, all registrations are removed. .SH "NÁVRATOVÉ HODNOTY" Funkce \fBon_exit\fP() vrací hodnotu 0, byla\-li úspěšná, jinak vrací nenulovou hodnotu. .SH ATRIBUTY Vysvětlení pojmů použitých v této části viz \fBattributes\fP(7). .TS allbox; lbx lb lb l l l. Rozhraní Atribut Hodnota T{ .na .nh \fBon_exit\fP() T} Zabezpečení vláken MT\-Safe .TE .SH STANDARDY None. .SH HISTORIE SunOS 4, glibc. Removed in Solaris (SunOS 5). Use the standard \fBatexit\fP(3) instead. .SH CAVEATS By the time \fIfunction\fP is executed, stack (\fIauto\fP) variables may already have gone out of scope. Therefore, \fIarg\fP should not be a pointer to a stack variable; it may however be a pointer to a heap variable or a global variable. .SH "DALŠÍ INFORMACE" \fB_exit\fP(2), \fBatexit\fP(3), \fBexit\fP(3) .PP .SH PŘEKLAD Překlad této příručky do češtiny vytvořili Pavel Heimlich . .PP Tento překlad je bezplatná dokumentace; Přečtěte si .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE nebo novější ohledně podmínek autorských práv. Neexistuje ŽÁDNÁ ODPOVĚDNOST. .PP Pokud narazíte na nějaké chyby v překladu této příručky, pošlete e-mail na adresu .MT translation-team-cs@lists.sourceforge.net .ME .