[git] GnuPG - branch, master, updated. gnupg-2.1.12-35-ge6d9a2d
by Werner Koch
cvs at cvs.gnupg.org
Fri May 27 22:24:03 CEST 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, master has been updated
via e6d9a2d07ed7aeac3944d8a7d1317c4a117356b4 (commit)
from 512c56af43027149e8beacf259746b8d7bf9b1a2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e6d9a2d07ed7aeac3944d8a7d1317c4a117356b4
Author: Werner Koch <wk at gnupg.org>
Date: Fri May 27 22:22:37 2016 +0200
common: Simplify the fd closing patch 512c56a.
* common/exechelp-posix.c (get_max_fds): Use /proc/self.
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/common/exechelp-posix.c b/common/exechelp-posix.c
index 81831ee..a7a9a92 100644
--- a/common/exechelp-posix.c
+++ b/common/exechelp-posix.c
@@ -114,14 +114,12 @@ get_max_fds (void)
* that list before starting to close them. */
#ifdef __linux__
{
- char dirname[50];
DIR *dir = NULL;
struct dirent *dir_entry;
const char *s;
int x;
- snprintf (dirname, sizeof dirname, "/proc/%u/fd", (unsigned int)getpid ());
- dir = opendir (dirname);
+ dir = opendir ("/proc/self/fd");
if (dir)
{
while ((dir_entry = readdir (dir)))
-----------------------------------------------------------------------
Summary of changes:
common/exechelp-posix.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list