Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

fileno - get file descriptor

&pagelevel(4)&pagelevel

Syntax

#include <stdio.h>

int fileno(FILE *stream);

Description fileno() returns the integer file descriptor associated with the stream pointed to by

stream.

Return val.

int value

-1

if successful. Value of the file descriptor associated with stream.

if an error occurs; errno is set to indicate the error.

Errors

fileno() will fail if:

EABDF       stream is not a valid stream.

Notes

The program environment determines whether fileno() is executed for a BS2000 or
POSIX file.

See also

fdopen(), fopen(), stdin(), stdio.h, section “Interaction of file descriptors andstreams”.