From 81fc303212b8379219cf5d463c8717359b972dba Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 18 Sep 2010 04:58:40 -0700 Subject: Use blocking IO in ebuild-ipc.py and EbuildIpcDaemon._send_reply(), in hopes that it will be more portable (see bug #337465). --- pym/_emerge/EbuildIpcDaemon.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'pym/_emerge/EbuildIpcDaemon.py') 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() -- cgit v1.2.3-1-g7c22