diff options
author | legezywzh <94814730+legezywzh@users.noreply.github.com> | 2023-10-25 19:19:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-25 12:19:39 +0100 |
commit | c814e3fac0d0f9a9060b9c02f8396ee7bdad2d70 (patch) | |
tree | 931866fc7e49989a1f33da2de18765bd38702e57 /lib/fuse_loop_mt.c | |
parent | 463871a535799d3a3b01562b928f89040cfa11cd (diff) | |
download | libfuse-c814e3fac0d0f9a9060b9c02f8396ee7bdad2d70.tar.gz |
fuse_clone_chan: avoid additional FD_CLOEXEC setting if O_CLOEXEC defined (#852)
Since open(2) has been called with O_CLOEXEC flag if defined.
Signed-off-by: Xiaoguang Wang <lege.wang@jaguarmicro.com>
Co-authored-by: Xiaoguang Wang <lege.wang@jaguarmicro.com>
Diffstat (limited to 'lib/fuse_loop_mt.c')
-rw-r--r-- | lib/fuse_loop_mt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/fuse_loop_mt.c b/lib/fuse_loop_mt.c index 0200d73..1d8b7b3 100644 --- a/lib/fuse_loop_mt.c +++ b/lib/fuse_loop_mt.c @@ -259,7 +259,9 @@ static struct fuse_chan *fuse_clone_chan(struct fuse_mt *mt) strerror(errno)); return NULL; } +#ifndef O_CLOEXEC fcntl(clonefd, F_SETFD, FD_CLOEXEC); +#endif masterfd = mt->se->fd; res = ioctl(clonefd, FUSE_DEV_IOC_CLONE, &masterfd); |