Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

epoll_create - create an epoll instance

&pagelevel(4)&pagelevel

Syntax

#include <sys/epoll.h>
int epoll_create (int size)

Description

The epoll functions are a scalable I/O event notification mechanism and thus an alternative
to the POSIX functions select() and poll().

epoll_create() creates an epoll instance and 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 epoll_create() should
be closed by using close().

The size argument is ignored, but must be greater than zero.

Return val.

File descriptor


if successful.

-1

if an error occurs; errno is set to indicate the error.

Errors

epoll_create() will fail if:

 

EINVAL

ENFILE

ENOMEM

size is not positive.

The system-wide limit on the total number of open files has been reached.

There was insufficient memory to create the kernel object .

See also

epoll_ctl(), epoll_wait()