.\" Written by Michael Haardt, Fri Nov 25 14:51:42 MET 1994 .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, .\" USA. .\" .\" Added siglongjmp, Sun Mar 2 22:03:05 EST 1997, jrv@vanzandt.mv.com .\" Modifications, Sun Feb 26 14:39:45 1995, faith@cs.unc.edu .\" Translated into Spanish Mon Mar 2 16:52:53 CET 1998 by Gerardo .\" Aburruzaga García .\" " .TH LONGJMP 3 "2 Marzo 1997" "" "Funciones de biblioteca" .SH NOMBRE longjmp, siglongjmp \- salto no local a un contexto de pila salvaguardado .SH SINOPSIS .ad l .B #include .sp .nf .BI "void longjmp(jmp_buf " env ", int " val ); .BI "void siglongjmp(sigjmp_buf " env ", int " val ); .fi .ad b .SH DESCRIPCIÓN \fBlongjmp()\fP y \fBsetjmp()\fP son útiles para tratar con errores e interrupciones encontrados en una subrutina de bajo nivel de un programa. \fBlongjmp()\fP restaura el entorno salvaguardado por la última llamada a \fBsetjmp()\fP con el argumento \fIenv\fP correspondiente. Después de que \fBlongjmp()\fP haya acabado, la ejecución del programa continúa como si la llamada correspondiente a \fBsetjmp()\fP simplemente hubiera devuelto el valor \fIval\fP. \fBlongjmp()\fP no puede hacer que se devuelva 0. Si se llama a \fBlongjmp()\fP con un segundo argumento de valor 0, se devuelve 1 en su lugar. .P \fBsiglongjmp()\fP es similar a \fBlongjmp()\fP excepto en el tipo de su argumento \fIenv\fP. Si la llamada a \fBsigsetjmp()\fP que establece este \fIenv\fP empleó una opción \fIsavesigs\fP distinta de cero, \fBsiglongjmp()\fP también restaura el conjunto de señales bloqueadas. .SH "VALOR DEVUELTO" Estas funciones nunca regresan. .SH "CONFORMES CON" POSIX. \fBlongjmp\fP también está definida por C ANSI/ISO. .SH OBSERVACIONES POSIX no especifica si \fBlongjmp\fP restaurará el contexto de señal. Si quiere salvaguardar y restaurar máscaras de señales, emplee \fBsiglongjmp\fP. .P \fBlongjmp()\fP y \fBsiglongjmp()\fP hace que los programas sean difíciles de entender y mantener. Si es posible se debería emplear algún mecanismo alternativo. .SH "VÉASE TAMBIÉN" .BR setjmp "(3), " sigsetjmp (3)