File: poll.2

package info (click to toggle)
manpages-es 0.4a-2
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 3,592 kB
  • ctags: 3
  • sloc: sh: 59; makefile: 42
file content (96 lines) | stat: -rw-r--r-- 3,133 bytes parent folder | download
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" Copyright (C) 1997 Andries Brouwer (aeb@cwi.nl)
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one
.\" 
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\" 
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.TH POLL 2 "16 de Julio de 1997" "Linux 2.1.23" "Manual del Programador de Linux
"
.SH NOMBRE
poll \- espera a cualquier evento en un descriptor de fichero
.SH SINTAXIS
.B #include <linux/asm/poll.h>
.sp
.BI "int poll(struct pollfd *" ufds ", unsigned int " nfds ", int " timeout );
.SH DESCRIPCIN
.B poll
es una variacion del tipo  
.BR select .
Especifica un vector de
.I nfds
estructuras del tipo
.br
.nf
        struct pollfd {
                int fd;
                short events;
                short revents;
        };
.fi
y un tiempo (contador)
.I timeout
en milisegundos. (Un valor negativo indica un tiempo infinito.)
El campo
.I events
es un parametro de entrada, una mascara de bits que especifica los eventos en lo
s que la aplicacion esta interesada.
El campo
.I revents
es un parametro de salida, completado por el nucleo con los eventos que han ocur
rido, del tipo solicitado o de uno de los tipos
.B POLLERR
o
.BR POLLHUP .
Los bits posibles en esta mascara estan definidos en <linux/asm/poll.h>:
.br
.nf
        #define POLLIN          0x0001
        #define POLLPRI         0x0002
        #define POLLOUT         0x0004
        #define POLLERR         0x0008
        #define POLLHUP         0x0010
        #define POLLNVAL        0x0020
        #define POLLRDNORM      0x0040
        #define POLLRDBAND      0x0080
        #define POLLWRNORM      0x0100
        #define POLLWRBAND      0x0200
        #define POLLMSG         0x0400
.fi
.SH "VALOR DEVUELTO"
Si todo es correcto, retorna el valor 0. En caso de error, \-1 es devuelto y el 
valor
.I errno
es fijado apropiadamente.
.SH ERRORES
.TP
.B ENOMEM
No hay espacio disponible para ubicar la tabla de descriptores del fichero.
.TP
.B EFAULT
El vector pasado como argumento no esta ubicado en el espacio de direcciones del
 programa invocador.
.TP
.B EINTR
Ocurrio una seqal (signal) antes de cualquier evento.
.SH "COMPATIBLE CON"
Esta llamada es especifica de Linux.
.SH "VER TAMBIEN"
.BR select (2)