File: setjmp.3

package info (click to toggle)
manpages-es 1.55-9
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 7,468 kB
  • ctags: 6
  • sloc: sh: 1,629; makefile: 64
file content (69 lines) | stat: -rw-r--r-- 2,842 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
.\" 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 <gerardo.aburruzaga@uca.es>
.\"
.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 <setjmp.h>
.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)