main: Increase FD limit

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>
This commit is contained in:
Joshua Ashton 2022-07-17 00:49:26 +00:00
parent 6c2bbb42ea
commit 722aa042b7
2 changed files with 6 additions and 0 deletions

View file

@ -9,6 +9,7 @@
#include "theme.h"
#include "xbm/xbm.h"
#include "menu/menu.h"
#include "common/fd_util.h"
struct rcxml rc = { 0 };
@ -85,6 +86,8 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
increase_nofile_limit();
struct server server = { 0 };
server_init(&server);
server_start(&server);