Manual Pages for Linux CentOS command on man epoll_create1
MyWebUniversity

Manual Pages for Linux CentOS command on man epoll_create1

EPOLLCREATE(2) Linux Programmer's Manual EPOLLCREATE(2)

NAME

epollcreate, epollcreate1 - open an epoll file descriptor SYNOPSIS

#include int epollcreate(int size); int epollcreate1(int flags); DESCRIPTION epollcreate() creates an epoll(7) instance. Since Linux 2.6.8, the size argument is ignored, but must be greater than zero; see NOTES below. epollcreate() returns a file descriptor referring to the new epoll instance. This file descriptor is used for all the subsequent calls to the epoll interface. When no longer required, the file descriptor returned by epollcreate() should be closed by using close(2). When all file descriptors referring to an epoll instance have been closed, the kernel destroys the instance and releases the associated resources for reuse. epollcreate1() If flags is 0, then, other than the fact that the obsolete size argu‐ ment is dropped, epollcreate1() is the same as epollcreate(). The following value can be included in flags to obtain different behavior: EPOLLCLOEXEC

Set the close-on-exec (FDCLOEXEC) flag on the new file descrip‐ tor. See the description of the OCLOEXEC flag in open(2) for reasons why this may be useful. RETURN VALUE On success, these system calls return a nonnegative file descriptor.

On error, -1 is returned, and errno is set to indicate the error. ERRORS EINVAL size is not positive. EINVAL (epollcreate1()) Invalid value specified in flags.

EMFILE The per-user limit on the number of epoll instances imposed by /proc/sys/fs/epoll/maxuserinstances was encountered. See epoll(7) for further details. ENFILE The system limit on the total number of open files has been reached. ENOMEM There was insufficient memory to create the kernel object. VERSIONS epollcreate() was added to the kernel in version 2.6. Library support is provided in glibc starting with version 2.3.2. epollcreate1() was added to the kernel in version 2.6.27. Library support is provided in glibc starting with version 2.9. CONFORMING TO

epollcreate() is Linux-specific. NOTES In the initial epollcreate() implementation, the size argument informed the kernel of the number of file descriptors that the caller expected to add to the epoll instance. The kernel used this informa‐ tion as a hint for the amount of space to initially allocate in inter‐ nal data structures describing events. (If necessary, the kernel would allocate more space if the caller's usage exceeded the hint given in size.) Nowadays, this hint is no longer required (the kernel dynami‐ cally sizes the required data structures without needing the hint), but size must still be greater than zero, in order to ensure backward com‐ patibility when new epoll applications are run on older kernels. SEE ALSO close(2), epollctl(2), epollwait(2), epoll(7) COLOPHON

This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can

be found at http://www.kernel.org/doc/man-pages/.

Linux 2012-04-15 EPOLLCREATE(2)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™