Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
yujianwjj
V2EX  ›  Linux

poll/epoll 关于突破 1024 限制的疑问?

  •  
  •   yujianwjj · Aug 24, 2017 · 3223 views
    This topic created in 3229 days ago, the information mentioned may be changed or developed.

    select 有 1024 限制的原因,是因为types.h中设置了#define FD_SETSIZE 1024

    但是在 linux 系统上面,ulimit -n 查看,maximum number of open file descriptors 是 1024。这个是系统的限制。

    那么,在使用 poll 和 epoll 的时候,是不是先要修改系统的这个限制。

    1 replies    2017-08-24 15:57:32 +08:00
    enenaaa
        1
    enenaaa  
       Aug 24, 2017
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1138 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 18:05 · PVG 02:05 · LAX 11:05 · JFK 14:05
    ♥ Do have faith in what you're doing.