1.1 --- a/pprocess.py Thu Jun 19 21:43:05 2008 +0200
1.2 +++ b/pprocess.py Sun Nov 19 00:10:06 2006 +0000
1.3 @@ -122,7 +122,7 @@
1.4 sockets are more predictable than pipes.
1.5 """
1.6
1.7 -__version__ = "0.2.1"
1.8 +__version__ = "0.2.2"
1.9
1.10 import os
1.11 import sys
1.12 @@ -273,16 +273,19 @@
1.13 readables = []
1.14 for fd, status in fds:
1.15 channel = self.readables[fd]
1.16 + removed = 0
1.17
1.18 # Remove ended/error channels.
1.19
1.20 if status & (select.POLLHUP | select.POLLNVAL | select.POLLERR):
1.21 self.remove(channel)
1.22 + removed = 1
1.23
1.24 # Record readable channels.
1.25
1.26 - elif status & select.POLLIN:
1.27 - readables.append(channel)
1.28 + if status & select.POLLIN:
1.29 + if not (removed and self.autoclose):
1.30 + readables.append(channel)
1.31
1.32 return readables
1.33