summaryrefslogtreecommitdiff
path: root/libs/pbd/file_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/pbd/file_manager.cc')
-rw-r--r--libs/pbd/file_manager.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/pbd/file_manager.cc b/libs/pbd/file_manager.cc
index a71ffca190..fb3227a922 100644
--- a/libs/pbd/file_manager.cc
+++ b/libs/pbd/file_manager.cc
@@ -289,6 +289,9 @@ StdioFileDescriptor::open ()
/* we must have a lock on the FileManager's mutex */
_file = fopen (_path.c_str(), _mode.c_str());
+ if (_file) {
+ fcntl(fileno(_file), F_SETFD, fcntl(fileno(_file), F_GETFD) | FD_CLOEXEC);
+ }
return (_file == 0);
}