errno 72

E

eyalc1978

Hi
Does someone knows what does errno 72 means
I got this error when fwriting a structure and still the file is being
created.
I saw something on the net saying that this is caused when trying to
access different file system
 
V

Vladimir S. Oka

Hi
Does someone knows what does errno 72 means
I got this error when fwriting a structure and still the file is being
created.
I saw something on the net saying that this is caused when trying to
access different file system

You can try using `strerror()` and `perror()` functions, but the result
is not guaranteed to be meaningful. You have to consult your
implementation documentation, and hope it's defined there. Try asking
in the group dedicated to your implementation/OS/whatever.
 
K

Keith Thompson

Does someone knows what does errno 72 means
I got this error when fwriting a structure and still the file is being
created.
I saw something on the net saying that this is caused when trying to
access different file system

You can use perror or strerror to get a message related to the error.
Specific errno values aren't portable. (On several systems I've just
checked, it means "RPC structure is bad", "Multihop attempted",
"Locked lock was unmapped", or "A connection is ended by software.".)

But it won't necessarily be meaningful. The fwrite() function doesn't
necessarily set errno on an error -- and any function can set errno to
a non-zero value whether it fails or not. (errno might be set as a
side effect of calling a lower-level function.) You can (sometimes)
use errno to determine which error occurred, but not to find out
whether an error occurred or not.

If you set errno to 0 before calling fwrite(), *and* the value
returned by fwrite() indicates that an error occurred, *and* error is
non-zero after the call, then it's likely (but not guaranteed) that
the value of errno will then be meaningful.
 
S

Skarmander

Keith Thompson wrote:
If you set errno to 0 before calling fwrite(), *and* the value
returned by fwrite() indicates that an error occurred, *and* error is
non-zero after the call, then it's likely (but not guaranteed) that
the value of errno will then be meaningful.
<ot>For all the moaning people do about performance, exceptions really
aren't that bad an idea, are they? :)</ot>

S.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top