Summary: | Dolphin and kde-open should not be closing file descriptors 1 and 2 | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Michael <burnsmellfactory> |
Component: | general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | CC: | burnsmellfactory, kfm-devel |
Priority: | NOR | ||
Version First Reported In: | 22.08.3 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Michael
2023-02-01 05:53:39 UTC
Some more references that leaving standard file descriptors closed is a bad idea (particularly for stderr): https://www.austingroupbugs.net/view.php?id=555 https://stackoverflow.com/questions/4972994/how-to-close-stdout-and-stderr-in-c https://unix.stackexchange.com/questions/163955/is-more-efficient-than-dev-null https://www.cygwin.com/bugzilla/show_bug.cgi?id=13983 I have a VM which runs xfce and I tried a similar experiment there to see how its file manager (Thunar) does this. It redirects file descriptors 0 and 1 to /dev/null, and 2 to ~/.xsession-errors. When running xdg-open, it redirects file descriptor 0 to /dev/null, and 1 and 2 both to the current pseudo tty in which xdg-open was run (in my case it was /dev/pts/1). Okay this is very strange. This problem does normally occur for me pretty regularly, but I tried it again just now (have *not* rebooted or restarted KDE or Plasma) and both Dolphin and kde-open are no longer closing (or leaving closed) the standard file descriptors. There must be some condition under which it is doing this. Well wouldn't you know it, the cause was some other script which was launching Dolphin with the standard file descriptors closed. Cases where this was working must've been when Dolphin was launched without this script. I'll keep this open for a bit while I confirm but I'm pretty sure that was the reason. Though I don't know how that ended up affecting xdg-open. I still don't know how this affected xdg-open, but I'm pretty confident the issue is fixed. Will reopen (or create a more precise new bug report) if not fixed. |