Author fpmc
Recipients d_kagedal, fpmc, gregory.p.smith, mkc, yorick
Date 2009-03-31.08:13:15
SpamBayes Score 1.27676e-14
Marked as misclassified No
Message-id <>

This is a patch that uses poll() in subprocess.communicate() if it is
available.  This is my first patch and may contain style errors.  I try
to conform to PEP 8 as close as I can.

Besides the discussion here, I would like to add this is desired because
select() has its own limit on the file descriptor size, in FD_SETSIZE. 
Unix has a different limit on the largest file descriptor, in 'ulimit
-n'.  When the select() limit is smaller than the ulimit limit, it is
not hard to get a file descriptor that is beyond FD_SETSIZE.  In that
case select() simply does not work.  Since there is no precise way to
force file descriptor to be small, the only workaround seems to be hack
like what hte first poster yorick suggests.

This is tested via 'python -w test_subprocess' under a
system that supports poll().  I don't have a system that does *not*
support poll, but I've done some manual edits to force that code path
and test it as well.  The test passes, which I think should be good
enough as it has several tests on communicate().

This patch is against 2.6.
Date User Action Args
2009-03-31 08:13:28fpmcsetrecipients: + fpmc, gregory.p.smith, mkc, yorick, d_kagedal
2009-03-31 08:13:25fpmcsetmessageid: <>
2009-03-31 08:13:18fpmclinkissue3392 messages
2009-03-31 08:13:16fpmccreate