Bump RLIMIT_NOFILE

Wayland compositors handle many file descriptors: client
connections, DMA-BUFs, sync_files, wl_data_device pipes, and so
on. Bump the limit to the max.

Closes: https://github.com/swaywm/sway/issues/6285
This commit is contained in:
Simon Ser 2021-10-21 21:52:17 +02:00 committed by Simon Zeni
parent 9969de9e00
commit 38020d157d
6 changed files with 41 additions and 0 deletions

View file

@ -750,6 +750,8 @@ static bool _spawn_swaybg(char **command) {
sway_log_errno(SWAY_ERROR, "fork failed");
return false;
} else if (pid == 0) {
restore_nofile_limit();
pid = fork();
if (pid < 0) {
sway_log_errno(SWAY_ERROR, "fork failed");