aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/file_input_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/file_input_plugin.c')
-rw-r--r--src/input/file_input_plugin.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/input/file_input_plugin.c b/src/input/file_input_plugin.c
index 07c1e4ed6..55b495f38 100644
--- a/src/input/file_input_plugin.c
+++ b/src/input/file_input_plugin.c
@@ -20,6 +20,7 @@
#include "config.h" /* must be first for large file support */
#include "input/file_input_plugin.h"
#include "input_plugin.h"
+#include "fd_util.h"
#include <sys/stat.h>
#include <fcntl.h>
@@ -50,7 +51,7 @@ input_file_open(struct input_stream *is, const char *filename)
*slash = '\0';
}
- fd = open(pathname, O_RDONLY);
+ fd = open_cloexec(pathname, O_RDONLY);
if (fd < 0) {
is->error = errno;
g_debug("Failed to open \"%s\": %s",