Message4702

Author pjenvey
Recipients markacy, pjenvey
Date 2009-05-21.01:26:34
SpamBayes Score 5.8824276e-07
Marked as misclassified No
Message-id <1242869195.45.0.31925432296.issue1350@psf.upfronthosting.co.za>
In-reply-to
Content
We can provide access to the real FDs in some environments. They are 
available via a private field in java.io.FileDescriptor (at least on Sun 
and IIRC other common JVMs). You can circumvent the private field's 
protection via reflection unless the java security policy disallows you 
from doing so. I believe JRuby is doing this

If you just need to work on the std streams, couldn't you check if the 
passed in fd in (fp.fileno() for fp in (sys.stdin, sys.stdout, 
sys.stderr))? Then map them to 0/1/2 accordingly? At least for the 
meantime, anyway. As we're not going to change fileno() until after the 
upcoming 2.5 release
History
Date User Action Args
2009-05-21 01:26:35pjenveysetmessageid: <1242869195.45.0.31925432296.issue1350@psf.upfronthosting.co.za>
2009-05-21 01:26:35pjenveysetrecipients: + pjenvey, markacy
2009-05-21 01:26:35pjenveylinkissue1350 messages
2009-05-21 01:26:34pjenveycreate