mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Schwartzmeyer <>
Subject Review Request 66455: Windows: Fixed `os::ftruncate()` to use `SetEndOfFile()`.
Date Wed, 04 Apr 2018 19:15:55 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for mesos.

Bugs: MESOS-8692

Repository: mesos


This previously used the CRT API `_chsize_s()`, which required a CRT
integer file descriptor. Instead, we can achieve the same behavior by
first using `os::lseek()` (which uses `SetFilePointerEx()`) to seek
`length`, and then use `SetEndOfFile()` to truncate. The only
difference is that the file is not filled with null bytes when
expanded, but we do not seem to rely on this behavior.


  3rdparty/stout/include/stout/os/windows/ftruncate.hpp fc4a8b5040d56fa9766687e44ce17fbe47d9e8f0




Andrew Schwartzmeyer

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message