Re: epoll_wait returns EFAULT error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Padmanabha, Lakshminarasimhan N (STSD) wrote:

      /* Wait for a connection from a client process.
                 * This is an example of a concurrent server.
                 */
                struct epoll_event *events ;

Just change this to struct epoll_event events[10] ;

You must pass a pointer to a epoll_event[] array of your own... kernel wont allocate ram for you :)


The epoll_wait consistently returns a EFAULT error . I am using a RedHat
Linux kernel version 2.6.5-1.358 .
The same epoll_wait works fine for a keyboard fd . Is there a configuration issue or am I missing something .


TIA ,
Simha.

See you Eric Dumazet

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux