gtk+3: fix dependencies for new gnome/accessibility/at-spi2-core
[oi-userland.git] / components / desktop / mate / mate-terminal / patches / 01-increase-nofds.patch
blob1cdf5231aee0ac556a221089c3055da0ef5fad14
1 --- mate-terminal-1.14.0/src/terminal.c.~1~ 2016-01-20 17:27:55.000000000 +0300
2 +++ mate-terminal-1.14.0/src/terminal.c 2016-07-26 11:56:17.940350521 +0300
3 @@ -26,6 +26,7 @@
4 #include <stdlib.h>
5 #include <time.h>
6 #include <unistd.h>
7 +#include <sys/resource.h>
9 #include <glib.h>
10 #include <glib/gstdio.h>
11 @@ -535,6 +536,7 @@
12 GError *error = NULL;
13 char *working_directory;
14 int ret = EXIT_SUCCESS;
15 + struct rlimit rlim;
17 setlocale (LC_ALL, "");
19 @@ -543,6 +545,15 @@
20 textdomain (GETTEXT_PACKAGE);
22 _terminal_debug_init ();
24 + if (getrlimit(RLIMIT_NOFILE, &rlim) == 0)
25 + {
26 + rlim.rlim_cur *= 4;
27 + if (rlim.rlim_cur > rlim.rlim_max)
28 + rlim.rlim_cur = rlim.rlim_max;
29 + setrlimit(RLIMIT_NOFILE, &rlim);
30 + }
33 /* Make a NULL-terminated copy since we may need it later */
34 argv_copy = g_new (char *, argc + 1);