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

Bug#929860: apt-get hangs forever when invoked via timeout



On Sun, Jun 02, 2019 at 01:44:26AM +0200, Martin Olsson wrote:
> I login and create this script /root/foo.sh:   ('bc' can be replaced
> with any package)
> 
>   #!/bin/sh
>   timeout 1m apt-get -y -qq install bc
> 
> I run 'chmod 755 /root/foo.sh' and then execute it:
> # /root/foo.sh
> Selecting previously unselected package bc.
> (Reading database ... 18047 files and directories currently installed.)
> Preparing to unpack .../bc_1.06.95-9+b3_amd64.deb ...
> Unpacking bc (1.06.95-9+b3) ...
> Processing triggers for man-db (2.7.6.1-2) ...
> Setting up bc (1.06.95-9+b3) ...
> 
> Here it freezes!

Not sure what to do about that.

APT is calling tcsetattr() to TCSAFLUSH the terminal after finishing
all dpkg operations, and the kernel stops the program with SIGTTOU.

Setting up all that magic works, but when it comes to cleanup, the
kernel says no and stops it.

-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en


Reply to: