summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <egon@debian-devbox>2013-03-01 12:08:16 +0100
committerMichael Vogt <egon@debian-devbox>2013-03-01 12:08:16 +0100
commit612300483371c0e53ed0000a838bbfbbc4b919e0 (patch)
treea9d7c1028ebcb5ec50a700ea0ba2a8600396f5e5 /apt-pkg
parent01b810674a34e30eb8bb913b94351cdaccd57e1c (diff)
parentb8dc791d39033030dd8b7a5ac4925c41d6820540 (diff)
merged from the lp:~mvo/apt/mvo branch
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/dpkgpm.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index fd1e6e085..0e468b590 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -423,7 +423,7 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf)
void pkgDPkgPM::DoStdin(int master)
{
unsigned char input_buf[256] = {0,};
- ssize_t len = read(0, input_buf, sizeof(input_buf));
+ ssize_t len = read(STDIN_FILENO, input_buf, sizeof(input_buf));
if (len)
FileFd::Write(master, input_buf, len);
else
@@ -1231,6 +1231,11 @@ bool pkgDPkgPM::Go(int OutStatusFd)
tcsetattr(0, TCSAFLUSH, &rtt);
sigprocmask(SIG_SETMASK, &original_sigmask, 0);
}
+ } else {
+ const char *s = _("Can not write log, tcgetattr() failed for stdout");
+ fprintf(stderr, "%s", s);
+ if(d->term_out)
+ fprintf(d->term_out, "%s",s);
}
// Fork dpkg
pid_t Child;