Index: bin/ebuild-ipc.py |
diff --git a/bin/ebuild-ipc.py b/bin/ebuild-ipc.py |
index d8e7e55129c24cb2899891ac312dc046adee26bf..84e7f3ba7c1135da0b8b6dadbb527530d731aaae 100755 |
--- a/bin/ebuild-ipc.py |
+++ b/bin/ebuild-ipc.py |
@@ -134,11 +134,7 @@ class EbuildIpc(object): |
return os.WEXITSTATUS(wait_retval[1]) |
- def _receive_reply(self): |
- |
- # File streams are in unbuffered mode since we do atomic |
- # read and write of whole pickles. |
- input_file = open(self.ipc_out_fifo, 'rb', 0) |
+ def _receive_reply(self, input_file): |
# For maximum portability, use a single atomic read. |
buf = None |
@@ -192,6 +188,10 @@ class EbuildIpc(object): |
self._no_daemon_msg() |
return 2 |
+ # File streams are in unbuffered mode since we do atomic |
+ # read and write of whole pickles. |
+ input_file = open(self.ipc_out_fifo, 'rb', 0) |
+ |
# Use forks so that the child process can handle blocking IO |
# un-interrupted, while the parent handles all timeout |
# considerations. This helps to avoid possible race conditions |
@@ -231,7 +231,7 @@ class EbuildIpc(object): |
if pid == 0: |
os.close(pr) |
- retval = self._receive_reply() |
+ retval = self._receive_reply(input_file) |
os._exit(retval) |
os.close(pw) |