V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
yujianwjj
V2EX  ›  Linux

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

  •  
  •   yujianwjj · Aug 24, 2017 · 3107 views
    This topic created in 3177 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   ·   5712 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 50ms · UTC 08:50 · PVG 16:50 · LAX 01:50 · JFK 04:50
    ♥ Do have faith in what you're doing.