[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: KDE libs (kio_file) holding on to files and directories during
From: Luke Kenneth Casson Leighton <lkcl () lkcl ! net>
Date: 2004-09-21 19:57:55
Message-ID: 20040921195755.GF1105 () lkcl ! net
[Download RAW message or body]
how - coding-wise - do i switch this off?
i have a situation where HAL is forcibly umounting a USB card (umount -l)
but there is a chance - with KDE Volume Manager - to receive
notifications before this actually happens.
therefore i am starting to hunt through the code looking for where
i can send these notifications, in order to force programs (such as
konqueror) to stop messing about.
i notice with interest that kio_floppy doesn't actually touch the floppy
drive itself, it uses mtools: this is, as a last resort, what i would
have to code up in a replacement for kio_file (!!!) calling ls, cat,
mkdir, rmdir, rm and /usr/bin/stat.
badly badly drastic, i know, but it would DoTheJob(tm).
the other drastic option which i have presently added into HAL's
code is to do this, just before the unmount:
system("lsof %s | sort | uniq | xargs kill -TERM",
device_mount_point)
this is, again, utterly utterly drastic - but it cleanly (by cutting off
at the knees) solves the problem: not much would be expected to survive
and users would get used to programs disappearing from under them if
they didn't close them down properly...
... but it's not really a nice solution.
so, i notice that there's kdiroperator.cpp and as a test i am switching
off setAutoUpdate() to see what happens.
if _that_ works then i will have a clue: to switch off the Directory
Notifying.
then i was thinking of tracking down a method to tell the Directory
Notifying that it should no longer "watch" a mountpoint (via a DCOP
interface into konqueror? KDirNotify-1/2?)
am i along the right lines, and will it help?
l.
--
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love. If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net"> lkcl.net </a> <br />
<a href="mailto:lkcl@lkcl.net"> lkcl@lkcl.net </a> <br />
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic