fusermount: close inherited fds
authorMJ Harvey <mharvey@jumptrading.com>
Wed, 21 Aug 2024 12:05:20 +0000 (07:05 -0500)
committerBernd Schubert <bernd.schubert@fastmail.fm>
Mon, 16 Sep 2024 11:59:27 +0000 (13:59 +0200)
commit5f137f01c1c8f97e9b3207a651090895e33a7dd3
tree3bad247a093c4145df77a9376d6f5632c539bfec
parent97991a65699cdb1a2f90fb42c3a3a6dfadbde0be
fusermount: close inherited fds

When using the auto_unmount option, the fusermount3
watchdog process retains any inherited file descriptors.
This PR ensures they are closed.

Reason is that FDs that are kept open for a long time might
cause issues for applications using libfuse, for example
if these expect a pipe close, but the pipe is kept open
through the inherited file descriptor.
See for example: https://github.com/cvmfs/cvmfs/issues/3645

Signed-off-by: MJ Harvey <mharvey@jumptrading.com>
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
util/fusermount.c