On Fri, Apr 20, 2012 at 12:57:29PM +0300, Teodor MICU wrote:
> 2012/4/20 Michael Vogt <m...@debian.org>:
> > Thanks for your bugreport. I fixed that now. I guess in your case it
> > was already the session-leader for some reason (maybe because of
> > systemd?).
> 
> Yes, I use «systemd» but I don't know what being session-leader means.
> Most times u-a is run automatically by Cron, only when I check or
> debug some problem its run from a tty/pts console.
> 
> Just for my curiosity, can you shortly explain what problem does
> os.setsid() fix or avoid?

Sure, the setsid() call makes the process a session leader and removes
the controlling tty. The rational is that if you run
unattended-upgrades in a shell and then shutdown your tty goes away
and unattended-upgrades gets killed even if its in the middle of a
operation (like a upgrade). The unattended-upgrades-shutdown script is
there to avoid that and keep the system running long enough to finish
the upgrade - but for that unattended-upgrades must not be terminated
by the tty going away.

Cheers,
 Michael



--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to