Message10074
This file has content (it's not just 0 length), and is readable from CPython and Pypy using open, and is readable in Jython 2.7.0 using os.open - but:
$ /usr/local/jython-2.7.0/bin/jython
Jython 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11)
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.7.0_65
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> pid = os.getpid()
>>> file_ = open('/proc/{}/status'.format(pid), 'r')
>>> file_.read()
''
>>> file_.close()
>>>
Using strace, I see Jython open the file as #15 and then:
2595 dup2(16, 15) = 15
2595 close(15) = 0
...and close it without any read being done. I didn't notice any mmap'ing going on either. I'm not sure what it was doing with the dup2'd filedescriptor.
Thanks for Jython! |
|
Date |
User |
Action |
Args |
2015-05-21 23:13:13 | dstromberg | set | recipients:
+ dstromberg |
2015-05-21 23:13:13 | dstromberg | set | messageid: <1432249993.87.0.147592441751.issue2358@psf.upfronthosting.co.za> |
2015-05-21 23:13:13 | dstromberg | link | issue2358 messages |
2015-05-21 23:13:13 | dstromberg | create | |
|