Fix bad interaction between llfuse and daemonization in arv-mount.
authorBrett Smith <brett@curoverse.com>
Tue, 24 Jun 2014 19:02:39 +0000 (15:02 -0400)
committerBrett Smith <brett@curoverse.com>
Tue, 24 Jun 2014 19:02:39 +0000 (15:02 -0400)
commitf573c35a8f829ac4624f4ef9fbe0d0178a734fa3
tree39d952424286545f9abed0c5000b8e6824e4a40b
parentbfaad44c23b334c91d347acb1517fd750f13e0c3
Fix bad interaction between llfuse and daemonization in arv-mount.

Following PEP 3143, daemon.DaemonContext drops all open file
descriptors by default.  This causes arv-mount to fail, because
llfuse.init() opens /dev/fuse, and llfuse.main() uses that file
descriptor.  We now daemonize before doing real work to prevent this
unintentional breakage.

This effectively reverts 83c873af.  An alternative approach would've
been to call DaemonContext with a preserve_files argument.  I decided
against that because I couldn't find a reliable way to determine
which file descriptors llfuse needs.  If we really need the daemon to
report errors, and debugging with --foreground isn't sufficient, I
think we should implement proper logging to a file or syslog.

No issue #.
services/fuse/bin/arv-mount