#592575 `yes '' | apt-get dist-upgrade' hangs

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Dmitry Maksyoma
Date:
2015-08-11 20:27:04 UTC
Severity:
normal
#592575#5
Date:
2010-08-11 06:20:04 UTC
From:
To:
#apt-get -s dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  acroread-debian-files fvwm gdk-imlib11 gtk-engines-lighthouseblue libgtk1.2
  lvm2
The following packages will be upgraded:
  gzip
1 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
Inst gzip [1.3.12-6+lenny] (1.3.12-6+lenny1 Debian:5.0.5/stable, Debian-Security:5.0/stable)
Conf gzip (1.3.12-6+lenny1 Debian:5.0.5/stable, Debian-Security:5.0/stable)

`yes '' | apt-get dist-upgrade' causes apt-get to block in write(2) because
nobody reads (or even has open) the pseudoterminal it writes to (since its
child, dpkg, is a zombie already).

Please see the patch for details. Thanks.

#592575#10
Date:
2010-08-11 17:33:27 UTC
From:
To:
Providing a patch against a severely outdated version is not very
helpful in general (and stable is severely outdated if it's not a
release critical bug; but I did not try applying it, so it may be OK in
this case). Furthermore, why would someone want to do yes '' | apt-get
dist-upgrade?

#592575#15
Date:
2010-08-16 00:32:59 UTC
From:
To:
OK. Please disregard the patch because it is broken (as in having bugs).
past, so, for automatic installation, "\n" was supplied for them.

The following problems are still there though:
* If write(2) in DoStdin is interrupted, the rest of input_buf would be lost.
* If read(2) in DoStdin fails, write(2) would be called with a negative
  `count' argument.

Worthwile fixing that?