Browse code

Fix SIGITIN hang with apt-get

Fix an issue where apt-get consistently hangs due to a SIGTTIN being
received. This occurs on a 'vanilla' devstack-gate VM, when running an
ironic-grenade job.

Upstream has a bug related to this:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=555632

http://www.gnu.org/software/libc/manual/html_node/Job-Control-Signals.html
Macro: int SIGTTIN

A process cannot read from the user's terminal while it is running
as a background job. When any process in a background job tries to
read from the terminal, all of the processes in the job are sent a
SIGTTIN signal. The default action for this signal is to stop the
process. For more information about how this interacts with the
terminal driver, see Access to the Terminal.

Change-Id: I8b1f3dccf329bb88e017eff7492da5e701b4892c
Closes-Bug: #1532080

John L. Villalovos authored on 2016/01/08 12:10:50
Showing 1 changed files
... ...
@@ -1065,7 +1065,7 @@ function apt_get {
1065 1065
     $sudo DEBIAN_FRONTEND=noninteractive \
1066 1066
         http_proxy=${http_proxy:-} https_proxy=${https_proxy:-} \
1067 1067
         no_proxy=${no_proxy:-} \
1068
-        apt-get --option "Dpkg::Options::=--force-confold" --assume-yes "$@"
1068
+        apt-get --option "Dpkg::Options::=--force-confold" --assume-yes "$@" < /dev/null
1069 1069
     result=$?
1070 1070
 
1071 1071
     # stop the clock