summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/resource.py
diff options
context:
space:
mode:
Diffstat (limited to 'geo-replication/syncdaemon/resource.py')
-rw-r--r--geo-replication/syncdaemon/resource.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py
index acbd49e1b54..6341de5ea79 100644
--- a/geo-replication/syncdaemon/resource.py
+++ b/geo-replication/syncdaemon/resource.py
@@ -169,7 +169,13 @@ class Popen(subprocess.Popen):
except ValueError: # file is already closed
time.sleep(0.5)
continue
- l = os.read(fd, 1024)
+
+ try:
+ l = os.read(fd, 1024)
+ except OSError:
+ time.sleep(0.5)
+ continue
+
if not l:
continue
tots = len(l)
@@ -204,6 +210,7 @@ class Popen(subprocess.Popen):
kw['close_fds'] = True
self.lock = threading.Lock()
self.on_death_row = False
+ self.elines = []
try:
sup(self, args, *a, **kw)
except: