:: Re: [DNG] Killing background proces…
Startseite
Nachricht löschen
Nachricht beantworten
Autor: Didier Kryn
Datum:  
To: dng
Betreff: Re: [DNG] Killing background processes on logout [was Re: resolved]
Le 08/06/2016 11:07, Jaromil a écrit :
> 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.
>
> 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.


     Yes, nohup. I guess it issues setsid() and disconnects from the 
controlling terminal, but any process can do that on its own. I was 
thinking of a way to decide which session can do that and which cannot, 
and I imagine it is only possible by running the session in a container 
(I don't know in detail how containers work), which is AFAIU what 
systemd does, but might be done by KISS means.


     Didier