
On Wed, Oct 14, 2009 at 10:45 AM, Beman Dawes <bdawes@acm.org> 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?
Thanks,
--Beman
It may be beyond the scope of Boost.Filesystem, but I'd really prefer C++ exceptions to be thrown instead of SIG faults. Particularly if I'm trying to write x-platform code, which might very well be the reason I'm using Boost.Filesystem instead of direct OS calls in the first place. But I can see this being a more general (and useful) feature - a SIG handler that converts to C++ exceptions. (I've written similar for Windows Structured Exceptions in the past.) Tony