<html style="direction: ltr;">
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body style="direction: ltr;" bidimailui-charset-is-forced="true"
    bgcolor="#FFFFFF" text="#000000">
    Looking at this test test_fdopen_keeps_fd_open_on_errors which fails
    on win32<br>
<a class="moz-txt-link-freetext" href="http://buildbot.pypy.org/summary/longrepr?testname=AppTestPosix.%28%29.test_fdopen_keeps_fd_open_on_errors&builder=own-win-x86-32&build=442&mod=module.posix.test.test_posix2">http://buildbot.pypy.org/summary/longrepr?testname=AppTestPosix.%28%29.test_fdopen_keeps_fd_open_on_errors&builder=own-win-x86-32&build=442&mod=module.posix.test.test_posix2</a><br>
    <br>
    It also fails when run with python -A, on cpython. It even fails in
    C when running the code from the MSDN example of fdopen,<br>
    <a class="moz-txt-link-freetext" href="https://msdn.microsoft.com/en-us/library/dye30d82.aspx">https://msdn.microsoft.com/en-us/library/dye30d82.aspx</a><br>
    if you replace the mode flag "r" with "w", windows will happily
    repopen a read-only file in write mode.<br>
    <br>
    The MSDN documentation is quiet on the issue of mode conflict
    between fd and a call to fdopen, where posix explicitly will return
    an error<br>
    <a class="moz-txt-link-freetext" href="http://linux.die.net/man/3/fdopen">http://linux.die.net/man/3/fdopen</a> "The mode of the stream (one of
    the values "r", "r+", "w", "w+", "a", "a+") must be compatible with
    the mode of the file descriptor." I could find any google results
    for complaints about win32's reckless behaviour.<br>
    <br>
    Two courses of action are possible:<br>
    - fix the test to reflect current cpython and pypy behaviour on
    win32<br>
    - file a bug with cpython and fix our win32 implementation to pass
    the current test<br>
    <br>
    Any thoughts?<br>
    Matti<br>
  </body>
</html>