aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/exec_always.c
diff options
context:
space:
mode:
authorLibravatar Simon Ser <contact@emersion.fr>2021-10-21 21:52:17 +0200
committerLibravatar Simon Zeni <simon@bl4ckb0ne.ca>2021-10-30 08:19:35 -0600
commit38020d157ddb58e756c654e9a2ff203c1562b25b (patch)
treee042c3c6d0d9f03e75812dffc0ac2e54d9b6dd8e /sway/commands/exec_always.c
parentAdd smart_gaps inverse_outer command (diff)
downloadsway-38020d157ddb58e756c654e9a2ff203c1562b25b.tar.gz
sway-38020d157ddb58e756c654e9a2ff203c1562b25b.tar.zst
sway-38020d157ddb58e756c654e9a2ff203c1562b25b.zip
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
Diffstat (limited to 'sway/commands/exec_always.c')
-rw-r--r--sway/commands/exec_always.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/commands/exec_always.c b/sway/commands/exec_always.c
index fce337d5..b35065c1 100644
--- a/sway/commands/exec_always.c
+++ b/sway/commands/exec_always.c
@@ -7,6 +7,7 @@
7#include <signal.h> 7#include <signal.h>
8#include "sway/commands.h" 8#include "sway/commands.h"
9#include "sway/config.h" 9#include "sway/config.h"
10#include "sway/server.h"
10#include "sway/tree/container.h" 11#include "sway/tree/container.h"
11#include "sway/tree/root.h" 12#include "sway/tree/root.h"
12#include "sway/tree/workspace.h" 13#include "sway/tree/workspace.h"
@@ -53,6 +54,7 @@ struct cmd_results *cmd_exec_process(int argc, char **argv) {
53 // Fork process 54 // Fork process
54 if ((pid = fork()) == 0) { 55 if ((pid = fork()) == 0) {
55 // Fork child process again 56 // Fork child process again
57 restore_nofile_limit();
56 setsid(); 58 setsid();
57 sigset_t set; 59 sigset_t set;
58 sigemptyset(&set); 60 sigemptyset(&set);