This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mallyvai
Recipients georg.brandl, mallyvai
Date 2009-03-26.19:38:30
SpamBayes Score 4.9960036e-16
Marked as misclassified No
Message-id <1238096312.97.0.564685442594.issue5573@psf.upfronthosting.co.za>
In-reply-to
Content
Python 2.6.1 (r261:67515, Mar 22 2009, 05:39:39) 
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from multiprocessing import Pipe
>>> parent, child = Pipe()
>>> parent.send(1)
>>> parent.close()
>>> print child.recv()
1
>>> print child.poll()
True
>>> print child.recv()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
EOFError

We have to use both poll() and recv() to determine whether or not the
connection was actually closed.

Better behavior might be returning True on poll() only if the next
recv() on that end of the pipe will work without an error. There may not
be a way to guarantee this, but it would be useful if the documentation
was clarified either way.


uname -a:
Linux mememy 2.6.24-23-generic #1 SMP Thu Feb 5 15:00:25 UTC 2009 i686
GNU/Linux

Compiled Python 2.6.1 from source.
History
Date User Action Args
2009-03-26 19:38:33mallyvaisetrecipients: + mallyvai, georg.brandl
2009-03-26 19:38:32mallyvaisetmessageid: <1238096312.97.0.564685442594.issue5573@psf.upfronthosting.co.za>
2009-03-26 19:38:31mallyvailinkissue5573 messages
2009-03-26 19:38:30mallyvaicreate