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:
@@ -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
@@ -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
|
||||
|
||||
@@ -11,6 +11,7 @@ stdint
|
||||
unistd
|
||||
extensions
|
||||
getpagesize
|
||||
open
|
||||
vma-iter
|
||||
|
||||
configure.ac:
|
||||
|
||||
Reference in New Issue
Block a user