ev.h
static int epoll_mod(int efd, int fd, int evs, void *data) {

    struct epoll_event ev;
    ev.data.fd = fd;

    // Being ev.data a union, in case of data != NULL, fd will be set to random
    if (data)
        ev.data.ptr = data;

    ev.events = evs | EPOLLHUP | EPOLLERR;

    return epoll_ctl(efd, EPOLL_CTL_MOD, fd, &ev);
}
/*
 * Modify an epoll-monitored descriptor, can be set to EPOLLIN for read and
 * EPOLLOUT for write
 */
Modify an epoll-monitored descriptor, can be set to EPOLLIN for read and
EPOLLOUT for write
Modify an epoll - monitored descriptor can be set to EPOLLIN for read and EPOLLOUT for write
static int epoll_mod(int efd, int fd, int evs, void *data) {
    struct epoll_event ev;
    ev.data.fd = fd;
    if (data)
        ev.data.ptr = data;
    ev.events = evs | EPOLLHUP | EPOLLERR;
    return epoll_ctl(efd, EPOLL_CTL_MOD, fd, &ev);
}
static int epoll_mod ( int efd , int fd , int evs , void * data ) { struct epoll_event ev ; ev . data . fd = fd ; if ( data ) ev . data . ptr = data ; ev . events = evs | EPOLLHUP | EPOLLERR ; return epoll_ctl ( efd , EPOLL_CTL_MOD , fd , & ev ) ; }
Modify an epoll-monitored descriptor, can be set to EPOLLIN for read and
 EPOLLOUT for write
Modify an epoll - monitored descriptor can be set to EPOLLIN for read and EPOLLOUT for write
// Being ev.data a union, in case of data != NULL, fd will be set to random