This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Kill processes still using a device when trying to unmount

164

Votes
166
2
Tags: solid solid solid
(comma "," separated)
knue
Registered Member
Posts
11
Karma
0
When a removable media is mounted in KDE it can normally unmounted without greater problems. But sometimes this doesn't work because an application still uses the device and it is quite hard to figure out which application still uses the device. Sometimes a buggy process owns the device of an application you don't even see.

First of all a better error message would be nice. Something like this:
"The usb stick couldn't be unmounted because the process
amarok
still uses the device."

Then buttons labeled with "kill" should be next to the listed processes. When you click the button the process gets killed. Perhaps the user should be asked for confirmation.
Zayed
Registered Member
Posts
143
Karma
0
OS
sceazy
Registered Member
Posts
3
Karma
0
OS
This is definitely something I'd want to see implemented, I've had a device refuse to unmount more than a couple times for no apparent reason.
knue
Registered Member
Posts
11
Karma
0
sceazy wrote:This is definitely something I'd want to see implemented, I've had a device refuse to unmount more than a couple times for no apparent reason.

Yeah, same here.
User avatar
plaristote
Registered Member
Posts
114
Karma
0
OS
Great idea !

It would be nice to have a box allowing us to chose which process we should kill and which we shouldn't (so we can kill the ones we don't care about, and take care by ourselves of the important ones).
User avatar
Maki
Registered Member
Posts
56
Karma
0
OS
What about reusing the system monitor from krunner to show what is using the media?


Maki, proud to be a member of KDE forums since 2008-Oct.
User avatar
plaristote
Registered Member
Posts
114
Karma
0
OS
Yep, this would be a good way to avoid useless code.

This should be doable not only for mounted devices but for every devices (like a webcam, which could be use by a process the user left).
User avatar
Madman
Registered Member
Posts
593
Karma
1
OS
Maybe this could be implemented into the device notifier: something like a plasma pop-up saying:
"[something] is still using this device!
Click the X to close [something]."
Then the unmount icon could be replaced with a big, red X. That way, users accustomed to this behaviour can just click and click again without moving the mouse.


Madman, proud to be a member of KDE forums since 2008-Oct.
User avatar
Angel Blue01
Registered Member
Posts
220
Karma
0
OS
Wasn't there something like this in KDE3?

Its a great idea nevertheless


Proudly dual-booting openSUSE 11.1 with KDE 4.3 and Windows Vista on a Toshiba A205-S4577 since July 2007.
User avatar
ash
Registered Member
Posts
280
Karma
0
killing stuff that wants to write can cause data loss. so i'd give other options too

switch to - to give focus (and open on the screen) the application that uses the drive. so the user can see if he has to save something first etc

close - to quit the process nicely (imitates clicking the X on the window) - if the app decides to ask 'do you want to save' etc the user sees this window and can click

kill (or shift-close) - to kill the process

the close / kill button can be colored depending on kde's estimate of how safe its to kill the process : black for process that is safe to kill. red to process that is not very safe. striped red and yellow to process that has data transfer in progress (and can cause more damage if killed - especially if there is fragmented ntfs drive etc)

++ to madman's suggestion
andre_orwell
Registered Member
Posts
181
Karma
1
With you Ash - I like the switch to option


andre_orwell, :-[
User avatar
plaristote
Registered Member
Posts
114
Karma
0
OS
If we use SIGTERM or SIGINT instead of SIGKILL, won't the application get the focus by themselves and ask for saving data, or close by themselves if nothing is to save ?

Applications can catch these signal, so I guess they do it.
It would be just like when you shut down the computer.
User avatar
robertm
KDE Developer
Posts
14
Karma
0
OS
Keep in mind it\'s also possible for a process owned by a different user to be accessing the device. That could complicate this some.
getaceres
Registered Member
Posts
2
Karma
0
OS
For me, it would be enough to show the offending processes and let me choose which one to kill or not.
User avatar
jospoortvliet
Registered Member
Posts
52
Karma
0
OS
Angel Blue01 wrote:Wasn\'t there something like this in KDE3?

Its a great idea nevertheless
Yeah, I believe we had this in KDE 3. Wasn\'t very pretty but it did work. This could be done with integration with ksysguard, as was suggested above. Guess it just needs someone to go and do it...


I don't do sigs.


Bookmarks



Who is online

Registered users: Bing [Bot], gfielding, Google [Bot], Sogou [Bot]