From: Miklos Szeredi Date: Fri, 21 Jun 2013 12:03:08 +0000 (+0200) Subject: libfuse: set FD_CLOEXEC also when receiving device fd from fusermount X-Git-Tag: fuse-3.0.0pre0~114 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=39065e40e0f00528980b35b52d8f5e13759e5a59;p=qemu-gpiodev%2Flibfuse.git libfuse: set FD_CLOEXEC also when receiving device fd from fusermount --- diff --git a/ChangeLog b/ChangeLog index 1d6f9e8..8b37e09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-06-21 Miklos Szeredi + + * libfuse: set FD_CLOEXEC also when receiving device fd from + fusermount + 2013-06-20 Miklos Szeredi * 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; }