GNOME Bugzilla – Bug 46728
inherited file descriptors stymie automounter
Last modified: 2004-12-22 21:47:04 UTC
Ina typical Red Hat 7 install, "/etc/X11/gdm/Sessions/Gnome" starts a GNOME session with stdout and stderr redirected to "$HOME/.gnomerc-errors". Anything spawned by the session will inherit these open file descriptors, including oafd. When the user logs out, nearly of those spawned programs terminate but oafd keeps running. That means that "$HOME/.gnomerc-errors" remains open, which in turn stops any automounter from unmounting the user's home directory. That's no good, because the whole idea of an automounter is to unmount NFS volumes that are not being used. oafd should close stdout and stderr, and in general should not keep files under $HOME open for indefinitely long periods. That may mean that it has to report problems via syslog() instead. ------- Additional Comments From liblit@acm.org 2001-02-16 18:25:54 ---- Note that fixing bug #46727 would essentially render this bug moot. ------- Additional Comments From mjs@noisehavoc.org 2001-02-20 13:38:26 ---- The simple version is to close std{in,out,error} at startup, open /dev/null, and dup2 it to all three of these fds. However, this will hide log output of components. Is this really a good idea? The fancy version in bug 46727 would finesse this but would also take 16-24 hours of work vs. the four here. ------- Additional Comments From don@eazel.com 2001-02-20 20:57:48 ---- Doing the hack you suggest won't break non-Red Hat systems, will it? ------- Additional Comments From mjs@noisehavoc.org 2001-02-21 01:14:20 ---- No. open(), /dev/null and dup2() are perfectly portable. But many people will hate me if components no longer write any debugging output to any console, including members of our own development team! In fact, this is a super quick hack once I know this is OK. I will Cc Darin, and if he reassures me will do the cheesy fix. ------- Additional Comments From mjs@noisehavoc.org 2001-02-21 01:51:03 ---- Wait, I figured out an OK way to do this. Use the /dev/null trick, but not if the OAF_DEBUG_OUTPUT environment variable is set. In fact, I just did it, and sent mail to warn people. ------- Bug moved to this database by unknown@bugzilla.gnome.org 2001-09-09 20:58 -------
Fix confirmed. "lsof -c oafd" shows that stdin, stdout, and stderr are /dev/null. More generally, no files are being held open under $HOME. All is as it should be.
The panel is explicitly setting BONOBO_ACTIVATION_DEBUG_OUTPUT=1, in effect causing this bug to regress. How rude! Since this is the panel's fault, and not bonobo-activation-server's, I've filed a new panel bug (#79037). This bug is marked as dependent upon that. I'm not going to reopen this bug, though, because nothing actually needs to change within the bonobo-activation code: Maciej's fix is still good, and will work as intended once the panel lets it.