Bug#561270: apt: APT::Status-Fd=1 causes problems
Package: apt
Version: 0.7.20.2+lenny1
Severity: normal
We have scripts that run apt-get upgrade -o APT::Status-Fd=1 to easily
capture apt-get's progress along with its regular output. This works
until apt forks a child process (such as to run localepurge after
upgrade); it closes stdout on fork, and localepurge aborts because it
can't output anything.
I tried APT::Keep-Fds, but that only avoids closing FDs that wouldn't
otherwise be closed (which the status FD is), and it doesn't work on FDs 0, 1,
or 2.
Should apt avoid setting FD_CLOEXEC if statusFd is 1 or 2? Or is it
simply unsupported to use a status FD of 1 or 2?
-- Package-specific info:
-- (/etc/apt/preferences present, but not submitted) --
-- (/etc/apt/sources.list present, but not submitted) --
-- System Information:
Debian Release: 5.0.3
APT prefers stable
APT policy: (900, 'stable'), (800, 'unstable'), (700, 'experimental')
Architecture: i386 (x86_64)
Kernel: Linux 2.6.26-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages apt depends on:
ii debian-archive-keyring 2009.01.31 GnuPG archive keys of the Debian a
ii libc6 2.7-18 GNU C Library: Shared libraries
ii libgcc1 1:4.3.2-1.1 GCC support library
ii libstdc++6 4.3.2-1.1 The GNU Standard C++ Library v3
apt recommends no packages.
Versions of packages apt suggests:
pn apt-doc <none> (no description available)
ii aptitude 0.4.11.11-1~lenny1 terminal-based package manager
ii bzip2 1.0.5-1 high-quality block-sorting file co
ii dpkg-dev 1.14.25 Debian package development tools
ii lzma 4.43-14 Compression method of 7z format in
ii python-apt 0.7.7.1+nmu1 Python interface to libapt-pkg
ii synaptic 0.62.1+nmu1 Graphical package manager
-- no debconf information
Reply to: