fileno(3S)fileno(3S)NAME
fileno() - map stream pointer to file descriptor
SYNOPSIS
Obsolescent Interfaces
DESCRIPTION
returns the integer file descriptor associated with the named stream; see open(2).
The following symbolic values in define the file descriptors associated with and when a program is started :
Value of zero for standard input,
Value of 1 for standard output,
Value of 2 for standard error,
Obsolescent Interfaces
map stream pointer to file descriptor
APPLICATION USAGE
is an obsolescent interface supported only for compatibility with existing DCE applications. New multithreaded applications should use
RETURN VALUE
Upon error, return -1.
SEE ALSO open(2), flockfile(3S), fopen(3S), thread_safety(5).
STANDARDS CONFORMANCE fileno(3S)
Check Out this Related Man Page
ferror(3S)ferror(3S)NAME
ferror(), feof(), clearerr(), ferror_unlocked(), feof_unlocked(), clearerr_unlocked() - stream status inquiries
SYNOPSIS
Obsolescent Interfaces
DESCRIPTION
Returns nonzero when an I/O error
has previously occurred reading from or writing to the named stream, otherwise zero. Unless cleared by or unless the spe-
cific stdio routine so indicates, the error indication lasts until the stream is closed.
Returns nonzero
when EOF has previously been detected reading the named input stream, otherwise zero.
Resets the error indicator and EOF indicator on the named
stream to zero.
Obsolescent Interfaces
and stream status inquiries.
WARNINGS
All these routines are implemented both as library functions and as macros. The macro versions, which are used by default, are defined in
To obtain the library function, either use a to remove the macro definition or, if compiling in ANSI-C mode, enclose the function name in
parentheses or use the function address. The following example illustrates each of these methods :
Reentrant Interfaces
If is defined before including the locked versions of the library functions for and are used by default.
and are obsolescent interfaces supported only for compatibility with existing DCE applications. New multithreaded applications should use
and
SEE ALSO open(2), flockfile(3S), fopen(3S), thread_safety(5).
STANDARDS CONFORMANCE ferror(3S)
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)