You are not logged in.
I use a user-level systemd service to run a hotkey daemon. For example, a key to open a terminal or web browser. These terminals end up being children of the hotkey daemon, and restarting the daemon kills them. Is there anything I can do to restart the parent process without killing the children?
`ExecReload` is not applicable in this case, and neither is patching the hotkey daemon.
Offline
Can you set the hotkey up to disown the process after spawning it? Maybe: urxvt && disown
Edit: Or, are the commands baked into the daemon?
Last edited by ewaller (2016-05-09 20:35:21)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
What you might want to do is set the hotkey daemon up to use systemd-run to launch things. That way, the child processes are reparented to your systemd --user instance, and tracked as separate service (or scope) units rather than as part of the hotkey daemon's service. That should do pretty much what you want.
Last edited by Wibjarm (2016-05-10 01:53:42)
Offline
`man setsid`
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thanks everyone! I used `setsid`, although `disown` would probably also work.
Offline
I'm confused. How can a simple `setsid` make the child processes leave the daemon's cgroup? Shouldn't systemd clean/kill the whole cgroup?
From my understanding, you should need to do what Wibjarm suggested.
Which hotkey daemon are you using? How does the actual unit file look like?
Just curious.
Offline