aboutsummaryrefslogtreecommitdiff
path: root/gnulib/import/openat-proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnulib/import/openat-proc.c')
-rw-r--r--gnulib/import/openat-proc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gnulib/import/openat-proc.c b/gnulib/import/openat-proc.c
index 9111cd3..b5aaee8 100644
--- a/gnulib/import/openat-proc.c
+++ b/gnulib/import/openat-proc.c
@@ -73,8 +73,9 @@ openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file)
problem is exhibited on code that built on Solaris 8 and
running on Solaris 10. */
- int proc_self_fd = open ("/proc/self/fd",
- O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK);
+ int proc_self_fd =
+ open ("/proc/self/fd",
+ O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK | O_CLOEXEC);
if (proc_self_fd < 0)
proc_status = -1;
else