A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-March/020958.html below:

[Python-Dev] test_largefile.py failing on Linux

[Python-Dev] test_largefile.py failing on Linux [Python-Dev] test_largefile.py failing on LinuxCharles Cazabon python@discworld.dyndns.org
Mon, 11 Mar 2002 20:14:42 -0600
Tim Peters <tim.one@comcast.net> wrote:
> I can easily enough change the Windows file.truncate() to leave the file
> position alone, although it will *have* to move it if the initial position
> is beyond the truncated size.  I'm baffled by what
> 
>     http://www.opengroup.org/onlinepubs/7908799/xsh/ftruncate.html
> 
> intends by
> 
>     These functions do not modify the file offset for any open file
>     descriptions associated with the file
> 
> in the cases where the current file position is indeed beyond the truncated
> size.  A Unix geek will have to answer that.

It should create a sparse file on the next write to the file, if the file
offset is not changed.  If the platform doesn't support sparse files, it
should be padded with 0 bytes by the OS to the necessary length to allow the
write to take place at the specified offset.

Charles
-- 
-----------------------------------------------------------------------
Charles Cazabon                           <python@discworld.dyndns.org>
GPL'ed software available at:  http://www.qcc.sk.ca/~charlesc/software/
-----------------------------------------------------------------------



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4