[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Could anyone please explain this to me?



I have a binary /foo that essantially does this:

cd /
fork;
if father exit;
setsid; 
kill all processes not in own session
umount /home

This works fine, when I simply log in and start /foo as root. However,
when I first cd /home after logging in and then start /foo it cannot
unmount /home. As you might expect by now, I have to partitions: / and
/home. That means I cannot umount /home if I started the binary with cwd
on this partition although the child process doesn't even know about the
original cwd. And my login shell ahs already been killed.

What can I do to avoid this? For my example it's not that big an issue,
but imagine /usr being mounted...

Thanks in advance
Michael

--
Dr. Michael Meskes, Projekt-Manager    | topystem Systemhaus GmbH
meskes@topsystem.de                    | Europark A2, Adenauerstr. 20
meskes@debian.org                      | 52146 Wuerselen
Go SF49ers! Use Debian GNU/Linux!      | Tel: (+49) 2405/4670-44


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: