Bug 423376 - Terminal programs started in Dolphin continue running after Dolphin exits, writing to .xsession-errors
Summary: Terminal programs started in Dolphin continue running after Dolphin exits, wr...
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 19.12.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-23 00:52 UTC by Isaac
Modified: 2020-06-23 00:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Isaac 2020-06-23 00:52:54 UTC
SUMMARY

When you start a Terminal program from Dolphin, it continues running in the background even after you close Dolphin. It receives zeroes as input and its output is directed to .xsession-errors. This continues until the disk is full (unless the user notices and stops it).

STEPS TO REPRODUCE
1. Write a short program that reads input and writes the same thing back as output. E.g. something like this:

BEGIN:
cin >> var;
cout << var;
goto BEGIN;


2. Compile it (I used: g++ test.cpp)

3. Go to the a.out file in Dolphin and double click on it.

4. Click on "Execute". The program will now run in the background but won't do anything (since it's not getting any input). You can see the program listed as a child process of Dolphin in KSysGuard.

5. Close Dolphin.

OBSERVED RESULT

The child process will continue running in the background (after Dolphin exits). You can see it will start taking up a whole CPU thread in KSysGuard (or "top" in Terminal). .xsession-errors will begin filling up with zeroes. It seems like after dolphin exits, the process starts being fed a steady stream of zeroes and its output is being redirected to .xsession-errors.

EXPECTED RESULT

I don't know what would be a good way to fix this. Would there be a way to make all child processes of Dolphin close when Dolphin closes? This might not be good though as other GUI applications are often started in Dolphin and they ought to continue running. Perhaps a feature can be added to prevent Dolphin from starting these sorts of programs to begin with?

Or maybe when Dolphin runs a program like this it should open the Terminal along with it (much like Windows does when you start a Terminal program from Explorer).

SOFTWARE/OS VERSIONS
 
Linux: 5.7.0-050700-generic
KDE Plasma: 5.18.5 
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8

ADDITIONAL INFORMATION

I'm using Kubuntu 20.04.