1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-09-01 02:34:55 +00:00

get-rusage-as: Make more robust in multithreaded applications.

* lib/get-rusage-as.c (get_rusage_as_via_setrlimit): Pass an O_CLOEXEC
flag to open().
* modules/get-rusage-as (Depends-on): Add 'open'.
This commit is contained in:
Bruno Haible
2020-05-27 19:40:08 +02:00
parent 520a9d23e2
commit 87b65cc5d2
3 changed files with 9 additions and 1 deletions
+7
View File
@@ -1,3 +1,10 @@
2020-05-28 Bruno Haible <bruno@clisp.org>
get-rusage-as: Make more robust in multithreaded applications.
* lib/get-rusage-as.c (get_rusage_as_via_setrlimit): Pass an O_CLOEXEC
flag to open().
* modules/get-rusage-as (Depends-on): Add 'open'.
2020-05-28 Bruno Haible <bruno@clisp.org>
crypto/gc: Make more robust in multithreaded applications.
+1 -1
View File
@@ -176,7 +176,7 @@ get_rusage_as_via_setrlimit (void)
const int fd = -1;
# else /* !HAVE_MAP_ANONYMOUS */
const int flags = MAP_FILE | MAP_PRIVATE;
int fd = open ("/dev/zero", O_RDONLY, 0666);
int fd = open ("/dev/zero", O_RDONLY | O_CLOEXEC, 0666);
if (fd < 0)
return 0;
# endif
+1
View File
@@ -11,6 +11,7 @@ stdint
unistd
extensions
getpagesize
open
vma-iter
configure.ac: