To screen developer team Hello, I'm an ordinary linux user. I found a problem when using screen in a specific situation, so I'll report it. (If this is already a known issue, sorry for interrupting!)
The problem is that if RLIMIT_NOFILE is very large value like 2147483584 (means unlimited in my machine), screen's response time becomes very long (16sec showing version, just only view version!), even in show help (-h) or show version (-v). I inspected screen's behaviour and discovered many poll function calls. So, cloned repo and some grep, I found that closeallfiles in main function and this is all of the reason. In closeallfiles, poll file descriptors sequentially to max num of the descriptor. But if RLIMIT_NOFILE is very large, this function calls poll many times and blocks the process itself. This function is called at the head of main, before parsing options section. So users need to wait even when using any option which doesn't need to close fd (like -h). I would suggest calling closeallfiles at later section, so that screen can early return some info like version, help, something like that. Or, if possible, implements other way to close unused file descriptor. If you want to verify this problem, maybe it is possible that set machine RLIMIT_NOFILE to unlimited or very large value my environment and screen version is below: sorry for my NDA, I can't tell you about detail machine info. Using Linux 6.16.8 /etc/os-release: ``` PRETTY_NAME="Kali GNU/Linux Rolling" NAME="Kali GNU/Linux" VERSION_ID="2025.4" VERSION="2025.4" VERSION_CODENAME=kali-rolling ID=kali ID_LIKE=debian HOME_URL="https://www.kali.org/" SUPPORT_URL="https://forums.kali.org/" BUG_REPORT_URL="https://bugs.kali.org/" ANSI_COLOR="1;31" ``` screen versions are: `Screen version 4.09.01 (GNU) 20-Aug-23` and `Screen version 5.0.0 (build on 2026-02-27 15:02:59)` (this is built by me at the master branch) Sorry for long mail, I appreciate your time and development of screen!
