473,734 Members | 2,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

errno 72

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 '06 #1
3 3390

eyalc1...@gmail .com 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

Mar 29 '06 #2
ey*******@gmail .com 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_Keit h) ks***@mib.org <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.
Mar 29 '06 #3
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.

Mar 29 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1555
by: Richard Tobin | last post by:
In a library I am writing, I want to use an errno-like mechanism for error returns. The error would probably be represented as a struct rather than just an integer. I don't have any multi-threaded programs, but others may who want to use my library. Most likely they'll be using a pthreads-compatible threads system. How can I best accommodate them? Presumably they will want the error object to be in per-thread storage, so to set and...
3
2435
by: Mac | last post by:
Is it legal to declare errno after you've included errno.h? For example: #include<errno.h> .... int main (void) {
3
3847
by: RoSsIaCrIiLoIA | last post by:
On Wed, 05 May 2004, CBFalconer <cbfalconer@yahoo.com> wrote: >Even if sscanf succeeds in inputting various fields, there are >probably range and other validity checks to be applied. The >interactive programmers work is never done :-) in how I see it errno (or errno like) would have 32 states 0 /* No error */ 1u, 2u, 4u, 8u, 16u, 32u, 64u, 128u, 256u, 512u, 1024u, 2048u 4096u, 8192u, 16384u, 32768u, 65536u, 131072u, 262144u,
4
9015
by: Paul Emmons | last post by:
If I am writing a function that sets errno according to a possible error condition, should it also set errno to 0 if it executes normally, or should it leave errno alone on success?
11
2528
by: Vijay Kumar R Zanvar | last post by:
> In <pan.2004.04.22.04.06.05.969827@bar.net> "Mac" <foo@bar.net> writes: > > >Is it legal to declare errno after you've included errno.h? > > > >For example: > > > >#include<errno.h> > > > >... > >
18
3432
by: pete | last post by:
On my system, the following five expressions are true: (HUGE_VAL == HUGE_VAL / 2) (1 / HUGE_VAL == 0) (sqrt(HUGE_VAL) == HUGE_VAL) (sqrt(-1) == HUGE_VAL) (sqrt(-HUGE_VAL) == HUGE_VAL) and
5
2364
by: Urs Beeli | last post by:
I have a question regarding errno. If I understand it correctly, including <errno.h> allows me to check "errno" for error values that some standard library functions may set. This brings up some questions: - As I understand it, most functions only set errno in an error case. I take this to mean, that on success, errno is not necessarily set to EOK and I would either need to set errno to EOK before calling the function in question to...
13
1937
by: Spiros Bousbouras | last post by:
Assume I'm writing a function which is going to set the value of errno if something went wrong but I also want to guarantee that errno will remain unchanged if the function completed its task succesfully. So at the beginning of my code I have something like int errsto = errno ; and just before every successful return I have errno = errsto ; Is this ok ?
22
2499
by: viza | last post by:
Hi all, A quick one - since errno is a lvalue, can I do: fread( & errno, sizeof errno, 1, fp ) ? TIA viza
0
8946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8776
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9236
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9182
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.