FILENO(3) Library Functions Manual FILENO(3)

filenomap a stream pointer to a file descriptor

#include <stdio.h>

int fileno(FILE *stream);

The fileno() function returns the integer file descriptor associated with the stream pointed to by stream .

Upon successful completion, fileno() returns the integer value of the file descriptor associated with stream . Otherwise, the value -1 is returned and errno is set to indicate the error.

The fileno() function may fail if:

The stream argument is not a valid stream.

None.

None.

None.

fdopen(3) , fopen(3) , stdin(3) , <stdio.h> , Standard I/O Streans .

Derived from Issue 1 of the SVID.

February 1997 posix.fail