[issue3392] subprocess fails in select when descriptors are large

2009-07-04 Thread Frank Chu

Frank Chu  added the comment:

Thanks!  Good to hear it's checked in finally :-).

Frank

On Fri, Jul 3, 2009 at 7:47 PM, Gregory P. Smith wrote:

>
> Gregory P. Smith  added the comment:
>
> Merged to py3k in r73833.
>
> --
>
> ___
> Python tracker 
> <http://bugs.python.org/issue3392>
> ___
>

--
Added file: http://bugs.python.org/file14446/unnamed

___
Python tracker 
<http://bugs.python.org/issue3392>
___Thanks!  Good to hear it's checked in finally 
:-).FrankOn Fri, Jul 3, 2009 at 7:47 
PM, Gregory P. Smith <mailto:rep...@bugs.python.org";>rep...@bugs.python.org> 
wrote:


Gregory P. Smith <mailto:g...@krypto.org";>g...@krypto.org> 
added the comment:

Merged to py3k in r73833.

--

___
Python tracker <mailto:rep...@bugs.python.org";>rep...@bugs.python.org>
<http://bugs.python.org/issue3392"; 
target="_blank">http://bugs.python.org/issue3392>
___

___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3392] subprocess fails in select when descriptors are large

2009-03-31 Thread Frank Chu

Frank Chu  added the comment:

Updated with new patch.  I moved the try: except logic in the module
initialization step so I get a global has_poll, similar to the global
mswindows already there.

I now use a try/except/else to be more robust (not needed now since it's
only "has_poll = True", but I think it's better code.

--
Added file: http://bugs.python.org/file13531/subprocess_with_poll3.diff

___
Python tracker 
<http://bugs.python.org/issue3392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3392] subprocess fails in select when descriptors are large

2009-03-31 Thread Frank Chu

Frank Chu  added the comment:

Hi,

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 regrtest.py -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.

--
keywords: +patch
nosy: +fpmc
Added file: http://bugs.python.org/file13511/subprocess_with_poll.diff

___
Python tracker 
<http://bugs.python.org/issue3392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com