Author: tack
Date: Mon Oct 8 14:42:21 2007
New Revision: 2846
Log:
_handle_read shouldn't return true on errno=11 if we're flushing, because
the child process could be dead, and that will cause a busy loop
inside flush().
Modified:
trunk/base/src/notifier/popen.py
Modified: trunk/base/src/notifier/popen.py
==============================================================================
--- trunk/base/src/notifier/popen.py (original)
+++ trunk/base/src/notifier/popen.py Mon Oct 8 14:42:21 2007
@@ -364,20 +364,23 @@
"""
Read as much as possible and close socket later.
"""
- while self._handle_input( self.fp ):
+ while self._handle_input( self.fp, True ):
pass
- def _handle_input( self, socket ):
+ def _handle_input( self, socket, flushing = False ):
"""
Handle data input from socket.
"""
try:
data = self.fp.read( 10000 )
except IOError, (errno, msg):
- if errno == 11:
+ if errno == 11 and not flushing:
# Resource temporarily unavailable; if we try to read on a
- # non-blocking descriptor we'll get this message.
+ # non-blocking descriptor we'll get this message. If we're
+ # being called from flush(), it could be because the child
+ # process is dead, in which case this errno will occur but
+ # we don't want to return True.
return True
data = None
except ValueError:
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog