[New-bugs-announce] [issue31106] os.posix_fallocate() generate exception with errno 0

Марк Коренберг report at bugs.python.org
Wed Aug 2 11:03:06 EDT 2017


New submission from Марк Коренберг:

===
os.posix_fallocate(os.open('qwe.qwe', os.O_RDONLY|os.O_CREAT), 0, 1024*1024)
===

generates OSError with errno 0. Suppose this happen due to O_RDONLY flag.

strace :

====
open("qwe.qwe", O_RDONLY|O_CREAT|O_CLOEXEC, 0777) = 3
fallocate(3, 0, 0, 1048576)             = -1 EBADF (Bad file descriptor)
====


Python 3.5.3, Ubuntu 64-bit.

----------
components: Library (Lib)
messages: 299660
nosy: socketpair
priority: normal
severity: normal
status: open
title: os.posix_fallocate() generate exception with errno 0
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31106>
_______________________________________


More information about the New-bugs-announce mailing list