[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#832593: apt-listbugs: Ctrl-C is not handled correctly



On Fri, Aug 12, 2016 at 12:40:44AM +0200, Francesco Poli wrote:
> Control: found -1 apt/1.3~rc1
> 
> 
> On Mon, 8 Aug 2016 01:05:31 +0200 Francesco Poli wrote:
> 
> [...]
> > > On Sun, Aug 07, 2016 at 12:22:47AM +0200, Francesco Poli wrote:
> [...]
> > > > [1] https://www.cons.org/cracauer/sigint.html
> [...]
> > Do I read the git diff output [2] correctly? It seems to me that the
> > modification implements the WUE approach (explained in [1]), rather
> > than the WCE approach.
> > I think that the WCE approach is really the way to go, since the hook
> > could use SIGINT for something very different from an abnormal exit.
> > Maybe, when the hook has finished its job, it exits successfully
> > without killing itself with a SIGINT. In that case, APT should *not*
> > abort the installation/upgrade!
> > 
> > [2] https://anonscm.debian.org/cgit/apt/apt.git/diff/?id=b2cfacf
> > 
> > In other words, I think that APT should wait for the child process to
> > exit (already implemented), but it should also figure out whether the
> > child process has exited on SIGINT or normally, in order to decide
> > whether it should abort or continue with the installation/upgrade.
> [...]
> > What is needed is the WCE strategy, as explained above.
> > Please implement it.
> > 
> > Thanks for your time.
> 
> Please reply to my question (quoted above).
> 
> In the meanwhile, I am reopening the bug.

Yes, sorry, I forgot to take this out of the changelog. So, basically,
AFAICT, what we should do is ignore the interrupt, because if the child
process exits with any error, we will error out as well. And if a child
exits because of a SIGINT, it's exit code won't be 0.

-- 
Debian Developer - deb.li/jak | jak-linux.org - free software dev

When replying, only quote what is necessary, and write each reply
directly below the part(s) it pertains to (`inline'). Thank you.


Reply to: