diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-05-31 16:44:03 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-06-04 18:09:56 +0200 |
commit | 402ae88af9a984b8a31c4a27f3cef14f76573a62 (patch) | |
tree | caf1cb7d6412b4683071fdaeb845a973c457a431 /src/starter | |
parent | 89c97952bda75c2aca8a46614b90c7b07614372f (diff) | |
download | strongswan-402ae88af9a984b8a31c4a27f3cef14f76573a62.tar.bz2 strongswan-402ae88af9a984b8a31c4a27f3cef14f76573a62.tar.xz |
starter: Close open file descriptors when forking daemons.
Diffstat (limited to 'src/starter')
-rw-r--r-- | src/starter/invokecharon.c | 1 | ||||
-rw-r--r-- | src/starter/invokepluto.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/starter/invokecharon.c b/src/starter/invokecharon.c index e88939415..ead55e9cc 100644 --- a/src/starter/invokecharon.c +++ b/src/starter/invokecharon.c @@ -192,6 +192,7 @@ int starter_start_charon (starter_config_t *cfg, bool no_fork, bool attach_gdb) case 0: /* child */ setsid(); + closefrom(3); sigprocmask(SIG_SETMASK, 0, NULL); /* disable glibc's malloc checker, conflicts with leak detective */ setenv("MALLOC_CHECK_", "0", 1); diff --git a/src/starter/invokepluto.c b/src/starter/invokepluto.c index 70c0692ea..2f46c99fb 100644 --- a/src/starter/invokepluto.c +++ b/src/starter/invokepluto.c @@ -276,6 +276,7 @@ starter_start_pluto (starter_config_t *cfg, bool no_fork, bool attach_gdb) } } setsid(); + closefrom(3); sigprocmask(SIG_SETMASK, 0, NULL); /* disable glibc's malloc checker, conflicts with leak detective */ setenv("MALLOC_CHECK_", "0", 1); |