diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2007-09-10 16:28:04 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2007-09-10 16:28:04 +0200 |
commit | da50ba30b371f21f264c040ca9f2161771d55233 (patch) | |
tree | b41456006259bdbc50f54b300f8abff134d4f7d4 | |
parent | 4f333a8bea2c8431df2ec92001981355623818e8 (diff) |
apt-pkg/deb/dpkgpm.cc:
- ignore EINTR on select()
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 36086d72e..ac63ccfdf 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -818,12 +818,16 @@ bool pkgDPkgPM::Go(int OutStatusFd) tv.tv_sec = 1; tv.tv_usec = 0; select_ret = select(max(master, _dpkgin)+1, &rfds, NULL, NULL, &tv); - if (select_ret < 0) { - std::cerr << "Error in select()" << std::endl; - continue; - } else if (select_ret == 0) - continue; - + if (select_ret == 0) + continue; + else if (select_ret < 0 && errno == EINTR) + continue; + else if (select_ret < 0) + { + perror("select() returned error"); + continue; + } + if(master >= 0 && FD_ISSET(master, &rfds)) DoTerminalPty(master); if(master >= 0 && FD_ISSET(0, &rfds)) |