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

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

  •  
  •   yujianwjj · Aug 24, 2017 · 3561 views
    This topic created in 3380 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
    enenaaa
    Aug 24, 2017
    1
    对
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2408 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 10:48 · PVG 18:48 · LAX 02:48 · JFK 05:48
    ♥ Do have faith in what you're doing.