libexplain  1.4.D001
Functions
libexplain/stream_to_fildes.h File Reference
#include <libexplain/ac/stdio.h>

Go to the source code of this file.

Functions

int explain_stream_to_fildes (FILE *fp)

Function Documentation

int explain_stream_to_fildes ( FILE *  fp)

The explain_stream_to_fildes function may be used to obtain a file descriptor from a stream pointer. Care is taken to avoid segfaults, hence this wrapper around fileno(3).

Parameters:
fpThe stream of interest
Returns:
file descriptor, or -1 if unsuccessful

Definition at line 25 of file stream_to_fildes.c.