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

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

  •  
  •   yujianwjj · Aug 24, 2017 · 3170 views
    This topic created in 3210 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   ·   1530 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 16:32 · PVG 00:32 · LAX 09:32 · JFK 12:32
    ♥ Do have faith in what you're doing.