[issue20428] _Py_open does not work with O_CREAT

STINNER Victor report at bugs.python.org
Mon Feb 3 02:14:35 CET 2014


STINNER Victor added the comment:

> In file included from ./Modules/_localemodule.c:404:0,

I don't see where _Py_open() is used in _localemodule.c. I didn't find a call to _Py_open() using O_CREAT. In fact, O_CREAT is not used in the C code of Python. (Except dbmopen in the dbm module, but it doesn't call open(), it calls dbm_open()).

> I already search the "default mode" but I didn't see it in the manual page.

The glibc pass 0 for the mode by default, but for O_CREAT it reads it from the third "mode" parameter.

----------

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


More information about the Python-bugs-list mailing list