Returns the file descriptor associated with the specified stream.
#include <stdio.h> int fileno ( FILE *fp);
(IN) Points to a stream opened with a previous call to fopen, freopen, or fdopen.
If successful, returns the integer file descriptor associated with the stream. Otherwise, returns -1 and sets errno to the following:
The returned file descriptor can be used to access the stream with any of the functions that take a file descriptor.