diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2013-06-21 14:03:08 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2013-06-21 14:03:08 +0200 |
commit | 39065e40e0f00528980b35b52d8f5e13759e5a59 (patch) | |
tree | 617f73f115d410a726b9803d66ed3daa97c60244 | |
parent | f0dcdad3a608e1f946b3cb2cb87b98f79d56b60e (diff) | |
download | fuse-39065e40e0f00528980b35b52d8f5e13759e5a59.tar.gz |
libfuse: set FD_CLOEXEC also when receiving device fd from fusermount
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/mount.c | 3 |
2 files changed, 8 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2013-06-21 Miklos Szeredi <miklos@szeredi.hu> + + * libfuse: set FD_CLOEXEC also when receiving device fd from + fusermount + 2013-06-20 Miklos Szeredi <miklos@szeredi.hu> * libfuse: fix multiple close of device fd. Reported by Dan diff --git a/lib/mount.c b/lib/mount.c index d7ba571..cb5d190 100644 --- a/lib/mount.c +++ b/lib/mount.c @@ -404,6 +404,9 @@ static int fuse_mount_fusermount(const char *mountpoint, struct mount_opts *mo, waitpid(pid, NULL, 0); /* bury zombie */ } + if (rv >= 0) + fcntl(rv, F_SETFD, FD_CLOEXEC); + return rv; } |