Distributors ponder a systemd change
Distributors ponder a systemd change
Posted Jun 8, 2016 8:48 UTC (Wed) by diegor (subscriber, #1967)In reply to: Distributors ponder a systemd change by darwish
Parent article: Distributors ponder a systemd change
And there is already a "clean the process after logout", it is called sighup. And it works. When i work on a remote server with ssh, I never see a process surviving the logout, that are not meant to do it.
Now, desktop is a different beast. Most of the problem come from program launching new process with nohup. That's happen because, they don't want the process be killed, when the father process is terminated. For example when you open an attachment from you email client, the viewer is a child of the email client. So when you close it, unix, as expected, clean all his child process. Because is cleaner, right? Do you see the problem now? Cleaning process is a desiderable thing, in theory, but the user complain, so every one start to mark the child process, as a process to not be cleaned out.
A better solution would be to have a "launcher" process for gui. Your email client instead of forking a new process, it can talk to the launcher and let it fork the new process. So when you logout, let the "launcher" clean his process, and let him kill them with fire, if it is really needed (without breaking everything else).