Extending port position beyond end of data Lassi Kortela (15 Apr 2020 10:35 UTC)
Re: Extending port position beyond end of data John Cowan (15 Apr 2020 14:20 UTC)
Re: Extending port position beyond end of data Lassi Kortela (15 Apr 2020 16:11 UTC)

Re: Extending port position beyond end of data Lassi Kortela 15 Apr 2020 16:11 UTC

> That's one case, but where there are no sparse files (as on NTFS) it
> still works.  I'm not sure if you get zeros or junk in the skipped part
> of the file.

POSIX write():
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html>

Errno EFBIG -- The file is a regular file, nbyte is greater than 0, and
the starting position is greater than or equal to the offset maximum
established in the open file description associated with fildes.

I guess ftruncate() or a similar function needs to be called first.
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>