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

@ -64,6 +64,8 @@ bool swaynag_spawn(const char *swaynag_command,
sway_log(SWAY_ERROR, "Failed to create fork for swaynag");
goto failed;
} else if (pid == 0) {
restore_nofile_limit();
pid = fork();
if (pid < 0) {
sway_log_errno(SWAY_ERROR, "fork failed");