Page MenuHomeFreeBSD

devel/gvfs should depend on sysutils/lsof

Authored by on Sep 19 2021, 3:26 AM.
Referenced Files
F83985563: D32018.id95349.diff
Fri, May 17, 8:18 PM
Unknown Object (File)
Wed, May 8, 8:44 AM
Unknown Object (File)
Wed, May 8, 8:44 AM
Unknown Object (File)
Wed, May 8, 8:44 AM
Unknown Object (File)
Wed, May 8, 8:22 AM
Unknown Object (File)
Sat, May 4, 11:43 PM
Unknown Object (File)
Sat, May 4, 10:02 PM
Unknown Object (File)
Sat, May 4, 6:49 PM



When a drive can't be unmounted and returns EBUSY, gvfs calls "lsof -t /mountpoint" to find which processes have files open. This list is sent over the "show-processes" signal, which allows file managers to show which apps are preventing the unmount. Since sysutils/lsof is currently not a dependency for devel/gvfs, this feature only works if the user separately installed sysutils/lsof.

(Originally reported as bug 254322.)

Test Plan
  1. Install some desktop file manager (Thunar/PCmanFM/Nemo/Konqueror/etc.). It needs to be built to use gvfsd (via Gnome's gio or KDE's solid), which needs to pull in sysutils/bsdisks, which usually happens by default.
  2. Make sure sysutils/lsof is NOT installed.
  3. Insert a removable drive, using a filesystem other than msdosfs (broken) or cd9660 (only fixed recently:
  4. Mount it through your desktop file manager
  5. Open a file on it.
  6. Try to eject the drive from the file manager while the file is open.

Without this patch, the dialog that is shown, with the list of open files that are stopping unmount, is always empty. With this patch, lsof is installed, and it shows the open files that needs to be closed before ejecting the drive can be done safely.

Diff Detail

R11 FreeBSD ports repository
Lint Not Applicable
Tests Not Applicable