[gnome-terminal/gnome-3-14] server: Reorder atfork/setrlimit calls
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal/gnome-3-14] server: Reorder atfork/setrlimit calls
- Date: Mon, 23 Mar 2015 19:00:48 +0000 (UTC)
commit 8a08ff5cc2c0a4bfcce401e96dc8da0ff5a6d185
Author: Christian Persch <chpe gnome org>
Date: Mon Nov 3 19:04:20 2014 +0100
server: Reorder atfork/setrlimit calls
(cherry picked from commit 5b338460a66a5c47ac90234e552c23ea9ed7c0f0)
src/server.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/server.c b/src/server.c
index e871c8f..a87de2d 100644
--- a/src/server.c
+++ b/src/server.c
@@ -87,11 +87,11 @@ increase_rlimit_nofile (void)
if (getrlimit (RLIMIT_NOFILE, &sv_rlimit_nofile) < 0)
return FALSE;
- l.rlim_cur = l.rlim_max = sv_rlimit_nofile.rlim_max;
- if (setrlimit (RLIMIT_NOFILE, &l) < 0)
+ if (pthread_atfork (NULL, NULL, atfork_child_restore_rlimit_nofile) != 0)
return FALSE;
- if (pthread_atfork (NULL, NULL, atfork_child_restore_rlimit_nofile) != 0)
+ l.rlim_cur = l.rlim_max = sv_rlimit_nofile.rlim_max;
+ if (setrlimit (RLIMIT_NOFILE, &l) < 0)
return FALSE;
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]