> On Сен. 15, 2015, 10:41 п.п., Martin Klapetek wrote: > > dataengines/devicenotifications/ksolidnotify.cpp, line 122 > > <https://git.reviewboard.kde.org/r/125248/diff/2/?file=404220#file404220line122> > > > > This should be a private method rather than a static method > > > > (and also const QString& devicePath --> const QString &devicePath) > > > > > > ...I'm thinking that maybe this method should become part of > > Solid::StorageAccess itself? Though I'm not the maintainer so I dunno but > > it seems it would be useful there > > Xuetian Weng wrote: > (Not a maintainer either :) ) I agree this should belong to solid, so we > can have platform dependent solution for more easily. Similar feature is also > implemented in gvfs. > > Actually I'm a little bit surprise that gvfs also uses lsof command to do > the same thing instead of parsing procfs. fuser may be an better alternative > POSIX choice. (Make sure use the posix compat option if you want to use fuser > http://www.unix.com/man-page/posix/1posix/fuser/ , if you run it manually > stderr will make the output confusing, run fuser -c / 2>/dev/null to get the > pid only output.)
That is a good point, however we definitely need a maintainers word here :) BTW, it works perfectly with fuser as well (see diff r3, you can easily switch between fuser/lsof), since QProcess by default ignores stderr. - Igor ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/125248/#review85469 ----------------------------------------------------------- On Сен. 16, 2015, 7:23 д.п., Igor Poboiko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/125248/ > ----------------------------------------------------------- > > (Updated Сен. 16, 2015, 7:23 д.п.) > > > Review request for Plasma and Solid. > > > Repository: plasma-workspace > > > Description > ------- > > An attempt to implement feature from [bug > 96107](https://bugs.kde.org/show_bug.cgi?id=96107) (see summary). > > On umount/eject error it runs "lsof" executable, gets PIDs of blocking > processes and obtains names of processes via KSysGuard::Process machinery. > Finally it appends obtained information to error message which is shown in > tooltip of Device Notifier applet. > > > Diffs > ----- > > dataengines/devicenotifications/CMakeLists.txt 3f7fd83 > dataengines/devicenotifications/ksolidnotify.h a471d50 > dataengines/devicenotifications/ksolidnotify.cpp 35d49d6 > > Diff: https://git.reviewboard.kde.org/r/125248/diff/ > > > Testing > ------- > > Tested unmount on busy device with several processes blocking it. Did not > test eject, since I have no optical disc drive :( > > > File Attachments > ---------------- > > Applet with error message > > https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png > > > Thanks, > > Igor Poboiko > >
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel