https://bugs.kde.org/show_bug.cgi?id=512327
Bug ID: 512327
Summary: Change current directory before exec() to prevent
hogging on removable mount point
Classification: Applications
Product: konsole
Version First master
Reported In:
Platform: unspecified
OS: All
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
When Konsole is launched from Dolphin using "Open Terminal Here"(Alt+Shift+F4),
the process is launched in the directory specified and the CWD remains
unchanged
for the duration of the lifespan of the process. If the CWD happens to be a
removeable mount point, say a USB flash drive, a external HDD or a network
mount, the kernel will complain that the mount point is still in use.
You were left with only two options: either terminate the process or do lazy
unmount.
But wait, it gets worse!
Note that the subsequent new windows and tabs will share the same CWD. All of
the sessions will share the same CWD.
STEPS TO REPRODUCE
1. In Dolphin, navigate to a removable storage device
2. Launch Konsole via right click context menu("Open Terminal Here") or the
shortcut key
3. In the launched Konsole, run `cd` to change CWD from the removable location
4. Run `pstree -ap $PPID; lsof -p $PPID -a -d cwd` in the launched Konsole to
confirm that the Qt process still has its CWD to set the removable mount point
5. Try unmounting the device
OBSERVED RESULT
Unable to unmount the device because the CWD of the Konsole process(not the
bash inside it) is set to the removable mount point.
EXPECTED RESULT
Able to unmount the device as no process is holding the removable mount point
as CWD.
ADDITIONAL INFORMATION
Suggested fix:
https://invent.kde.org/dxdt/konsole/-/commit/33b189fe690d105cadb18c36fc8200cbdbddf9a1
Related patch: https://gitlab.gnome.org/GNOME/nautilus/-/issues/3824
--
You are receiving this mail because:
You are watching all bug changes.