Subject: Re: [boost] [filesystem] truncate() function?
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2009-10-14 11:02:57
-----BEGIN PGP SIGNED MESSAGE-----
On Wednesday 14 October 2009, Beman Dawes wrote:
> There was a request on the users list for a file truncate() function
> similar to the POSIX function of the same name. Since Windows provides a
> function with virtually identical semantics, this seems like a
> reasonable request.
> The POSIX spec includes:
> "If the request would cause the file size to exceed the soft file size
> limit for the process, the request shall fail and the implementation
> shall generate the SIGXFSZ signal for the process."
> I have no knowledge of or experience with POSIX signals, so need advice.
> Does the POSIX implementation need to do anything to cope with the
> possibility of a SIGXFSZ signal? If so what?
I don't think you need to do anything. In POSIX, write() can also generate a
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
-----END PGP SIGNATURE-----
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk