Boost logo

Boost :

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-----
Hash: SHA1

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
SIGXFSZ signal.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkrV6CEACgkQ5vihyNWuA4UvyACdExcODHvL0FqtJ/WU7q2KyY9y
2X8An0jt+QMd29UxxD/NXcNPQtWcVZrG
=iLLw
-----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