diff options
Diffstat (limited to 'vespalog/src')
-rw-r--r-- | vespalog/src/vespa/log/log-target-fd.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vespalog/src/vespa/log/log-target-fd.cpp b/vespalog/src/vespa/log/log-target-fd.cpp index a740d3fef06..bb7590a9908 100644 --- a/vespalog/src/vespa/log/log-target-fd.cpp +++ b/vespalog/src/vespa/log/log-target-fd.cpp @@ -1,6 +1,7 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <sys/types.h> #include <unistd.h> +#include <fcntl.h> #include <cstring> #include <cstdlib> @@ -22,6 +23,7 @@ LogTargetFd::LogTargetFd(int fd_spec, const char *target) if (isatty(_fd) == 1) { _istty = true; } + fcntl(_fd, F_SETFD, FD_CLOEXEC); } LogTargetFd::~LogTargetFd() |