aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-18 04:58:40 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-18 04:58:40 -0700
commit81fc303212b8379219cf5d463c8717359b972dba (patch)
tree71a2c429d84d9770b58f9df15946daf6da502bee /pym/_emerge/EbuildIpcDaemon.py
parentDisable EbuildIpcDaemon for Darwin (similar issues to FreeBSD). (diff)
downloadportage-81fc303212b8379219cf5d463c8717359b972dba.tar.gz
portage-81fc303212b8379219cf5d463c8717359b972dba.tar.bz2
portage-81fc303212b8379219cf5d463c8717359b972dba.zip
Use blocking IO in ebuild-ipc.py and EbuildIpcDaemon._send_reply(),
in hopes that it will be more portable (see bug #337465).
Diffstat (limited to 'pym/_emerge/EbuildIpcDaemon.py')
-rw-r--r--pym/_emerge/EbuildIpcDaemon.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/pym/_emerge/EbuildIpcDaemon.py b/pym/_emerge/EbuildIpcDaemon.py
index 66d868ba2..73a088c5e 100644
--- a/pym/_emerge/EbuildIpcDaemon.py
+++ b/pym/_emerge/EbuildIpcDaemon.py
@@ -3,9 +3,7 @@
import errno
import pickle
-from portage import os
from _emerge.FifoIpcDaemon import FifoIpcDaemon
-from _emerge.PollConstants import PollConstants
class EbuildIpcDaemon(FifoIpcDaemon):
"""
@@ -67,15 +65,12 @@ class EbuildIpcDaemon(FifoIpcDaemon):
reply_hook()
def _send_reply(self, reply):
- output_fd = os.open(self.output_fifo, os.O_WRONLY|os.O_NONBLOCK)
-
# File streams are in unbuffered mode since we do atomic
# read and write of whole pickles.
- output_file = os.fdopen(output_fd, 'wb', 0)
+ output_file = open(self.output_fifo, 'wb', 0)
# Write the whole pickle in a single atomic write() call,
# since the reader is in non-blocking mode and we want
# it to get the whole pickle at once.
output_file.write(pickle.dumps(reply))
- output_file.flush()
output_file.close()