Tags: error, errors, file, fromi, guessing, linux, mmap, programming, reading, stat, thesigbus, truncation, unix
mmap, truncation and I/O errors
On Programmer » Unix & Linux
1,072 words with 1 Comments; publish: Mon, 28 Apr 2008 02:03:00 GMT; (20062.50, « »)
When reading a file through mmap(), can you tell truncation from
I/O error ? Other than by doing a stat() on the file after the
SIGBUS and /guessing/ that since st_size is lesser than the
offset, that's "probably not" an I/O error.
Thanks.
Andr Majorel <URL:http://www.teaser.fr/~amajorel/>
(Counterfeit: yras.unix-linux.itags.org.mxsoft.biz byt.unix-linux.itags.org.demur.com)
There is always someone somewhere who needs a good laugh.
http://unix-linux.itags.org/q_unix-linux-programming_89706.html
All Comments
Leave a comment...
- 1 Comments

- Andre Majorel schrieb:
> When reading a file through mmap(), can you tell truncation from
> I/O error ? Other than by doing a stat() on the file after the
> SIGBUS and /guessing/ that since st_size is lesser than the
> offset, that's "probably not" an I/O error.
Sorry,
I do not understand your question. Could you please precise a little
more what you would like to do, maybe with a code example?
Regards,
Trinity Of Matrix
E-Mail (only for spammer): trinity.matrix.unix-linux.itags.org.localhost.localdomain
#1; Mon, 28 Apr 2008 02:04:00 GMT