Skip to content
  • Jon Olav Hauglid's avatar
    a1dfc5db
    Bug#11746812: CREATE_TEMP_FILE() DOESN'T HONOR · a1dfc5db
    Jon Olav Hauglid authored
                  O_TEMPORARY OPTION (FILE NOT REMOVED)
    
    The problem was that O_TEMPORARY is only defined on Windows and
    not on any of our other supported platforms. This flag is used
    to indicate that a file is temporary and should be deleted
    automatically. On other platforms it was #defined to 0 and thus
    had no effect. This mean that special handling was needed
    everywhere O_TEMPORARY was used.
    
    This patch fixes the problem by removing O_TEMPORARY (instead
    of introducing a new flag which might conflict with existing
    OS flags). Cleanup of temporary files is now done with common
    code on all platforms.
    
    The patch also removes O_SHARE and O_SHORT_LIVED which was
    not supported on any platforms (and thus #defined to 0).
    It also removes O_BINARY. It was only defined on Windows
    and my_win_open() always adds _O_BINARY anyway.
    a1dfc5db
    Bug#11746812: CREATE_TEMP_FILE() DOESN'T HONOR
    Jon Olav Hauglid authored
                  O_TEMPORARY OPTION (FILE NOT REMOVED)
    
    The problem was that O_TEMPORARY is only defined on Windows and
    not on any of our other supported platforms. This flag is used
    to indicate that a file is temporary and should be deleted
    automatically. On other platforms it was #defined to 0 and thus
    had no effect. This mean that special handling was needed
    everywhere O_TEMPORARY was used.
    
    This patch fixes the problem by removing O_TEMPORARY (instead
    of introducing a new flag which might conflict with existing
    OS flags). Cleanup of temporary files is now done with common
    code on all platforms.
    
    The patch also removes O_SHARE and O_SHORT_LIVED which was
    not supported on any platforms (and thus #defined to 0).
    It also removes O_BINARY. It was only defined on Windows
    and my_win_open() always adds _O_BINARY anyway.
Loading