.\" 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., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. .\" .\" Added sigsetjmp, 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 Sun Mar 8 21:08:20 CET 1998 by Gerardo .\" Aburruzaga García .\" .TH SETJMP 3 "2 marzo 1997" "Linux" "Funciones de biblioteca" .SH NOMBRE setjmp, sigsetjmp \- guardan el contexto de pila para saltos no locales .SH SINOPSIS .ad l .B #include .sp .nf .BI "int setjmp(jmp_buf " env ); .BI "int sigsetjmp(sigjmp_buf " env ", int " savesigs ); .fi .ad b .SH DESCRIPCIÓN Las funciones \fBsetjmp()\fP y \fBlongjmp()\fP son útiles para tratar con errores e interrupciones encontradas en una subrutina de bajo nivel de un programa. \fBsetjmp()\fP guarda el entorno/contexto de pila en \fIenv\fP para un uso posterior de \fBlongjmp()\fP. El contexto de pila será invalidado si la función que llamó a \fBsetjmp()\fP regresa. .P \fBsigsetjmp()\fP es similar a \fBsetjmp()\fP. Si \fIsavesigs\fP es distinto de cero, el conjunto de señales bloqueadas se guarda en \fIenv\fP y será restaurado si se llama más tarde a \fBsiglongjmp()\fP con este \fIenv\fP. .SH "VALOR DEVUELTO" \fBsetjmp()\fP y \fBsigsetjmp()\fP devuelven 0 si regresan directamente, y no-cero cuando regresan desde \fBlongjmp()\fP usando el contexto previamente salvaguardado. .SH "CONFORME A" POSIX, ISO 9899 (C99) .SH OBSERVACIONES POSIX no especifica si \fBsetjmp\fP guardará el contexto de señales. (En SYSV no lo hará. En BSD4.3 sí, y hay una función \fB_setjmp\fP que no lo hará). Si quiere guardar las máscaras de señales, use \fBsigsetjmp\fP. .P \fBsetjmp()\fP y \fBsigsetjmp\fP hacen que los programas sean difíciles de entender y mantener. Si es posible busque otra alternativa. .SH "VÉASE TAMBIÉN" .BR longjmp (3), .BR siglongjmp (3)