This defaults to 1024, which is tiny, but is a requirement
for processes using the deprecated `select` function.
We must reset this back whenever we fork to start a new process,
as this is inherited, and breaks applications using `select` otherwise.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
#include <unistd.h>
#include <wlr/util/log.h>
#include "common/spawn.h"
+#include "common/fd_util.h"
void
spawn_async_no_shell(char const *command)
wlr_log(WLR_ERROR, "unable to fork()");
goto out;
case 0:
+ restore_nofile_limit();
+
setsid();
sigset_t set;
sigemptyset(&set);
#include "theme.h"
#include "xbm/xbm.h"
#include "menu/menu.h"
+#include "common/fd_util.h"
struct rcxml rc = { 0 };
exit(EXIT_FAILURE);
}
+ increase_nofile_limit();
+
struct server server = { 0 };
server_init(&server);
server_start(&server);