Bug 487564 - killing a script that gets started with a kde shortcut kills the whole plasma session
Summary: killing a script that gets started with a kde shortcut kills the whole plasma...
Status: REPORTED
Alias: None
Product: frameworks-kglobalaccel
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 6.3.0
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-26 01:44 UTC by Jim Jones
Modified: 2024-06-12 20:18 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
script to reproduce the bug (81 bytes, application/x-shellscript)
2024-06-01 19:17 UTC, Jim Jones
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Jones 2024-05-26 01:44:16 UTC
SUMMARY
killing an app that gets started with a defined shortcut kills the whole plasma session

the actual script used called - ~/foo.sh
"
#!/bin/bash

trap "exit" INT TERM ERR
trap "{ kill 0; }" EXIT

sleep 1000 &
wait
"

STEPS TO REPRODUCE
1. define a shortcut - Add new -> "Command and Script", as command set ~/foo.sh and define a keyboard shortcut
2. activate the command by pressing the keyboard shortcut
3. open a konsole window and run - killall foo.sh

OBSERVED RESULT
the whole /usr/bin/startplasma-x11 session gets killed

EXPECTED RESULT
the script should get killed, the /usr/bin/startplasma-x11 session should be unaffected

SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 2.15
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0
Kernel Version: 6.9.1 (64-bit)
Graphics Platform: X11
Memory: 38.8 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620

ADDITIONAL INFORMATION
Comment 1 Jim Jones 2024-05-26 01:50:41 UTC
the whole plasma session also gets killed, when wayland is used instead of x11
Comment 2 Jim Jones 2024-05-29 09:32:33 UTC
ping
Comment 3 Jim Jones 2024-06-01 19:10:59 UTC
krunner is also effected, after starting the script and killing it from a shell, krunner is gone and some shortcuts don't work anymore until kde is restarted
Comment 4 Jim Jones 2024-06-01 19:17:38 UTC
Created attachment 170049 [details]
script to reproduce the bug
Comment 5 Nate Graham 2024-06-11 23:02:37 UTC
What is this script *supposed to* do?
Comment 6 Jim Jones 2024-06-12 09:30:00 UTC
(In reply to Nate Graham from comment #5)
> What is this script *supposed to* do?

it's an example script that triggers the bugs. the "kill 0" that should kill all child processes (of the script) kills the whole kde session
Comment 7 Jim Jones 2024-06-12 09:31:21 UTC
was it possible to reproduce the bug?
Comment 8 Nate Graham 2024-06-12 17:11:38 UTC
Nope, my Plasma Wayland session failed to die after I killed that script from Konsole following launching it via a global shortcut.
Comment 9 Jim Jones 2024-06-12 18:25:19 UTC
did you make sure that the script is actuall running?

what does "ps aux|grep foo.sh" show?

could someone else please try to reproduce the bug? It kill my x11/plasma session each time i kill the script, which i started with a global shortcut, from a konsole session.
Comment 10 Nate Graham 2024-06-12 20:18:44 UTC
Yes, I made sure it was actually running.

This is like the opposite of Bug 473702. Very strange.