:: Re: [DNG] Killing background proces…
Top Page
Delete this message
Reply to this message
Author: Dan Purgert
Date:  
To: dng
Subject: Re: [DNG] Killing background processes on logout [was Re: resolved]
Jaromil wrote:
> On Wed, 08 Jun 2016, Didier Kryn wrote:
>
> >     Otherwise, I like the idea to have a better control of what
> > survives a session.

>
> I also like that and I like that is simply made.
>
> For many of us is already made possible in simple ways: you run inside
> screen (or even better tmux, having read screen's code) the processes
> you want to survive. All the rest shall die on logout.


Unless you're using systemd230, then everything dies, even stuff that
shouldn't :/

As for "kill all the user-started things", isn't that already do-able
at logout -- such as hooking a script into your logout process (similar
to hooking all kinds of things to .bashrc for login)?

> I use the ZSh shell, which implements also good handling of exceptions
> with background processes: when you send to background and logout,
> warns you about it. If you explicitly 'disown' a process, it will keep
> running even after logout. Bash may have something similar.


bash syntax is 'nohup <command> &' (well, I believe the ampersand is
optional, but tossing that long running process to background is
generally more useful -- at least to me).

--
|_|O|_| Registered Linux user #585947
|_|_|O| Github: https://github.com/dpurgert
|O|O|O|