summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/strutl.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:53:05 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:53:05 +0000
commitb0db36b1ac7a93c147888aa98f9431e8bcc7d36e (patch)
tree0db564188095f9826ceb47156b1b4740a7fafb96 /apt-pkg/contrib/strutl.cc
parent78b558ca4dab74f113cec91362b055263baa8011 (diff)
Signal safety
Author: jgg Date: 1999-03-16 00:43:55 GMT Signal safety
Diffstat (limited to 'apt-pkg/contrib/strutl.cc')
-rw-r--r--apt-pkg/contrib/strutl.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index a2464c9a3..8bbc6174d 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: strutl.cc,v 1.21 1999/03/15 08:10:39 jgg Exp $
+// $Id: strutl.cc,v 1.22 1999/03/16 00:43:55 jgg Exp $
/* ######################################################################
String Util - Some usefull string functions.
@@ -26,6 +26,7 @@
#include <string.h>
#include <stdio.h>
#include <unistd.h>
+#include <errno.h>
/*}}}*/
// strstrip - Remove white space from the front and back of a string /*{{{*/
@@ -529,6 +530,8 @@ bool ReadMessages(int Fd, vector<string> &List)
while (1)
{
int Res = read(Fd,End,sizeof(Buffer) - (End-Buffer));
+ if (Res < 0 && errno == EINTR)
+ continue;
// Process is dead, this is kind of bad..
if (Res == 0)