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 vajrasky
Recipients alex, nikratio, vajrasky
Date 2013-06-02.07:24:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1370157850.52.0.207799162507.issue18116@psf.upfronthosting.co.za>
In-reply-to
Content
I isolate the bug. It happens in these lines:

        # Always try reading and writing directly on the tty first.
        fd = os.open('/dev/tty', os.O_RDWR|os.O_NOCTTY)
        tty = os.fdopen(fd, 'w+', 1)

So to produce the bug more specifically, you can try this python file:

# bugme2.py
import os

fd = os.open('/dev/tty', os.O_RDWR|os.O_NOCTTY)
os.fdopen(fd, 'w+', 1)
# end of bugme2.py

In Linux Fedora 18, I would get this error:

/home/sky/Code/python/programming_language/cpython/Lib/os.py:1025: ResourceWarning: unclosed file <_io.FileIO name=3 mode='rb+'>
  return io.open(fd, *args, **kwargs)
Traceback (most recent call last):
  File "/tmp/bugme2.py", line 4, in <module>
    os.fdopen(fd, 'w+', 1)
  File "/home/sky/Code/python/programming_language/cpython/Lib/os.py", line 1025, in fdopen
    return io.open(fd, *args, **kwargs)
io.UnsupportedOperation: File or stream is not seekable.
History
Date User Action Args
2013-06-02 07:24:10vajraskysetrecipients: + vajrasky, alex, nikratio
2013-06-02 07:24:10vajraskysetmessageid: <1370157850.52.0.207799162507.issue18116@psf.upfronthosting.co.za>
2013-06-02 07:24:10vajraskylinkissue18116 messages
2013-06-02 07:24:09vajraskycreate