Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue18660] os.read behavior on Linux

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Aug 5, 2013, 1:47 AM

Post #1 of 6 (28 views)
Permalink
[issue18660] os.read behavior on Linux

New submission from Louis RIVIERE:

A call to os.read that used to work on older Linux kernel, doesn't anymore with newer Linux kernel.
As a workaroud we can use libc.read (ctypes) instead of os.read.
But I feel like os.read should work, as it used to.

The code (and comments) can be seen here : http://code.activestate.com/recipes/576375-low-level-inotify-wrapper/

----------
components: IO
messages: 194461
nosy: dugres
priority: normal
severity: normal
status: open
title: os.read behavior on Linux
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue18660>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 5, 2013, 3:47 AM

Post #2 of 6 (25 views)
Permalink
[issue18660] os.read behavior on Linux [In reply to]

Changes by Ronald Oussoren <ronaldoussoren [at] mac>:


----------
nosy: +ronaldoussoren

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue18660>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 9, 2013, 6:57 PM

Post #3 of 6 (18 views)
Permalink
[issue18660] os.read behavior on Linux [In reply to]

Changes by Tshepang Lekhonkhobe <tshepang [at] gmail>:


----------
nosy: +tshepang

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue18660>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 11, 2013, 9:32 PM

Post #4 of 6 (17 views)
Permalink
[issue18660] os.read behavior on Linux [In reply to]

Benjamin Peterson added the comment:

Can you please explain what the bug is in Python; that is, what exactly was wrong with os.read?

----------
nosy: +benjamin.peterson

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue18660>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 11, 2013, 9:51 PM

Post #5 of 6 (16 views)
Permalink
[issue18660] os.read behavior on Linux [In reply to]

Benjamin Peterson added the comment:

This is not a Python bug. Linux is just not accepting "0" as a valid size argument to read(). You don't see this using libc.read because you don't check errno. Just don't call os.read() if size == 0.

----------
resolution: -> invalid
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue18660>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 12, 2013, 7:43 AM

Post #6 of 6 (13 views)
Permalink
[issue18660] os.read behavior on Linux [In reply to]

Louis Riviere added the comment:

Thanks Benjamin !
I should have known that "Python doesn't break things" :)

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue18660>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.