SELECT
2
2001-02-09
Linux 2.4
Linux Programmer's Manual
The pselect function is defined in IEEE Std 1003.1g-2000 (POSIX.1g), and part of POSIX 1003.1-2001. It is found in glibc2.1 and later. Glibc2.0 has a function with this name, that however does not take a sigmask parameter.
Concerning the types involved, the classical situation is that the two fields of a struct timeval are longs (as shown above), and the struct is defined in <sys/time.h> . The POSIX 1003.1-2001 situation is
struct timeval {
time_t tv_sec; /* seconds */
suseconds_t tv_usec; /* microseconds */
};
where the struct is defined in <sys/select.h> and the data types time_t and suseconds_t are defined in <sys/types.h> . Concerning prototypes, the classical situation is that one should include <time.h> for select . The POSIX 1003.1-2001 situation is that one should include <sys/select.h> for select and pselect . Libc4 and libc5 do not have a <sys/select.h> header; under glibc 2.0 and later this header exists. Under glibc 2.0 it unconditionally gives the wrong prototype for pselect , under glibc 2.1-2.2.1 it gives pselect when _GNU_SOURCE is defined, under glibc 2.2.2-2.2.4 it gives it when _XOPEN_SOURCE is defined and has a value of 600 or larger. No doubt, since POSIX 1003.1-2001, it should give the prototype by default.
|
||||||||||