ferror(3s)ferror(3s)Name
ferror, feof, clearerr, fileno - stream status inquiries
Syntax
#include <stdio.h>
feof(stream)
FILE *stream;
ferror(stream)
FILE *stream
void clearerr(stream)
FILE *stream
fileno(stream)
FILE *stream;
Description
The function returns nonzero when an error has occurred reading or writing the named stream, otherwise zero. Unless cleared by the error
indication lasts until the stream is closed.
The function returns nonzero when end of file is read on the named input stream, otherwise zero.
The function resets both the error and EOF indicators on the named stream.
The function returns the integer file descriptor associated with the stream, see
These functions are implemented as macros; they cannot be redeclared.
See Alsoopen(2), fopen(3s)ferror(3s)
Check Out this Related Man Page
ferror(3C) Standard C Library Functions ferror(3C)NAME
ferror, feof, clearerr, fileno - stream status inquiries
SYNOPSIS
#include <stdio.h>
int ferror(FILE *stream);
int feof(FILE *stream);
void clearerr(FILE *stream);
int fileno(FILE *stream);
DESCRIPTION
The ferror() function returns a non-zero value when an error has previously occurred reading from or writing to the named stream (see
Intro(3)). It returns 0 otherwise.
The feof() function returns a non-zero value when EOF has previously been detected reading the named input stream. It returns 0 otherwise.
The clearerr() function resets the error indicator and EOF indicator to 0 on the named stream.
The fileno() function returns the integer file descriptor associated with the named stream; see open(2).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO open(2), Intro(3), fopen(3C), stdio(3C), attributes(5), standards(5)SunOS 5.11 17 Feb 2005 ferror(3C)
hi guys, I'have a question 4 u.
Why this code give me the right output (an integer on the stdout):
read(fd,&mpid,sizeof(pid_t));
printf("%d\n",mpid);
Instead this code give me only a blank line:
read(fd,&mpid,sizeof(pid_t));
write(STDOUT_FILENO,&mpid,sizeof(pid_t));
... (2 Replies)
Hey,
Im a complete noob in UNIX and this problem is killing me.
Im trying to write the stdin (which i receive from a pipe) to a file, but as always C crashes without no explanation. Here is what i have so far:
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>... (3 Replies)
Hello,
Please help about writing a process that will be automatically notified by file creation in a predefined directory. Some code will appreciated.
Thanks for all. (4 Replies)
Hi All,
i am trying to install oracle client on AIX box its throwing follwing error.
iam using x wimdows to install.please help me.
java.io.FileNotFoundException: /tmp/OraInstall2010-12-01_08-08-07PM/oui/instImages/images.properties (A file or directory in the path name does not exist.)
... (5 Replies)