.\" -*- 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 "20 ​​Julio 2023" "Páginas de manual de Linux 6.05.01" .SH NOMBRE on_exit \- registra una función para ser invocada en la terminación normal de un programa .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .nf \fB#include \fP .PP \fBint on_exit(void (*\fP\fIfunción\fP\fB)(int , void *), void *\fP\fIarg\fP\fB);\fP .fi .PP .RS -4 Requisitos de Macros de Prueba de Características para glibc (véase \fBfeature_test_macros\fP(7)): .RE .PP \fBon_exit\fP(): .nf A partir de glibc 2.19: _DEFAULT_SOURCE Anteriores a glibc 2.19: _BSD_SOURCE || _SVID_SOURCE .fi .SH DESCRIPCIÓN La función \fBon_exit()\fP registra la \fIfuncion\fP dada para ser invocada en la terminación normal de un programa, ya sea vía \fBexit\fP(3) o vía el valor retornado por la función \fBmain\fP() del programa. A la \fIfuncion\fP se le pasa el parámetro de \fBexit\fP(3) y el parámetro \fIarg\fP de \fBon_exit\fP(). .PP Es posible registrar la misma función varias veces: se invoca una vez para cada registro. .PP 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 "VALOR DEVUELTO" La función \fBon_exit\fP() devuelve el valor 0 en caso de éxito, o un valor distinto de cero en caso contrario. .SH ATRIBUTOS Para obtener una explicación de los términos usados en esta sección, véase \fBattributes\fP(7). .TS allbox; lbx lb lb l l l. Interfaz Atributo Valor T{ .na .nh \fBon_exit\fP() T} Seguridad del hilo Multi\-hilo seguro .TE .sp 1 .SH ESTÁNDARES None. .SH HISTORIAL 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 "VÉASE TAMBIÉN" \fB_exit\fP(2), \fBatexit\fP(3), \fBexit\fP(3) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Urko Lusa y Marcos Fouces . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .