Opened 14 years ago
Last modified 14 years ago
#8686 new defect
Change process directory to / before forking
Reported by: | blade | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 4.0.4 |
Keywords: | Cc: | ||
Guest type: | other | Host type: | other |
Description
Unfortunately, the startup directory of VBox* services is kept while these daemons run even when nothing else is using that directory/filesystem during execution. This prevents the underlying filesystem from being umounted when needed.
I created a patch to change it to / on Unix-like systems, similar to what GNU daemon(3) function does.
Attachments (1)
Change History (3)
by , 14 years ago
Attachment: | chdir_to_root.diff added |
---|
comment:1 by , 14 years ago
comment:2 by , 14 years ago
In the mean time we've implemented an intelligent solution which solves the problem on Windows. Not enough spare time yet to do the same on all other platforms.
This might solve one problem but creates others. The most severe one is that VBoxSVC will no longer be able to create core dumps due to the access rights of /.
VBoxSVC just isn't a "normal" daemon, as it is run by the user. For those it would make sense to change to the home directory of the user. If it's running then the home directory of the user needs to be present anyway.