errno 72

Discussion in 'C Programming' started by eyalc1978@gmail.com, Mar 29, 2006.

  1. Guest

    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
     
    , Mar 29, 2006
    #1
    1. Advertisements

  2. wrote:
    > 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.

    --
    BR, Vladimir
     
    Vladimir S. Oka, Mar 29, 2006
    #2
    1. Advertisements

  3. writes:
    > 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.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
     
    Keith Thompson, Mar 29, 2006
    #3
  4. Skarmander Guest

    Keith Thompson wrote:
    <snip>
    > 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.
     
    Skarmander, Mar 29, 2006
    #4
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus Elfring

    conversion: errno => exception

    Markus Elfring, Nov 8, 2004, in forum: C++
    Replies:
    13
    Views:
    3,759
    Markus Elfring
    Jan 5, 2005
  2. Replies:
    3
    Views:
    515
    Ron Natalie
    Mar 4, 2005
  3. Marcia Hon

    errno 13

    Marcia Hon, Feb 9, 2004, in forum: C Programming
    Replies:
    3
    Views:
    594
    Mike Wahler
    Feb 9, 2004
  4. Richard Tobin

    errno-like variables in threaded environments

    Richard Tobin, Feb 27, 2004, in forum: C Programming
    Replies:
    4
    Views:
    459
    Richard Tobin
    Feb 27, 2004
  5. Mac

    declaring errno

    Mac, Apr 22, 2004, in forum: C Programming
    Replies:
    3
    Views:
    2,006
    Dave Thompson
    Apr 26, 2004
  6. RoSsIaCrIiLoIA

    Why vsscanf() doesn't change errno for range error?

    RoSsIaCrIiLoIA, May 4, 2004, in forum: C Programming
    Replies:
    2
    Views:
    379
    RoSsIaCrIiLoIA
    May 4, 2004
  7. viza

    &errno, sizeof errno

    viza, Sep 12, 2008, in forum: C Programming
    Replies:
    20
    Views:
    1,412
    Tim Rentsch
    Sep 14, 2008
  8. Glenn Linderman

    errno 22 instead of errno 2

    Glenn Linderman, Jan 28, 2009, in forum: Python
    Replies:
    0
    Views:
    531
    Glenn Linderman
    Jan 28, 2009
Loading...