On Fri, Apr 20, 2012 at 04:11:16PM +0300, Teodor MICU wrote:
> 2012/4/20 Michael Vogt <m...@debian.org>:
> > 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.
> 
> I think this protection is necessary only if U-A::Automatic-Reboot is
> set to "true", right? If affirmative, why not wait until u-a finish
> the pkgs upgrade and then do the reboot?

Thanks for your mail!

It protects against e.g. a user manually running unattended-upgrade in
a terminal and then someone shuting down the machine. In this case the
running unattended-upgades would get killed even if its in the middle
of the upgrade leaving the system in a bad state. It will also help if
cron does not put u-n into its own process-group (I don't know if it
will do that or not, but I assume it will) and on shutdown cron might
get killed and with it the running u-n. The goal is to keep u-n alive
and let the "unattended-upgrades-shutdown" script deal with stopping
it or waiting until its finished. Given that I think that cron puts it
into its own process group already its just a minor protection, but
AFAICT there are no downsides either :)

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