]> git.saurik.com Git - apt.git/commitdiff
apt-pkg/deb/dpkgpm.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 10 Sep 2007 14:28:04 +0000 (16:28 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 10 Sep 2007 14:28:04 +0000 (16:28 +0200)
- ignore EINTR on select()

apt-pkg/deb/dpkgpm.cc

index 36086d72e06553bba81d1a145a9c3f3c56fdcb9a..ac63ccfdf73d0a55086011a3b89ca0fd13368d3f 100644 (file)
@@ -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))