Back to index

glibc  2.9
isfdtype.c File Reference
#include <errno.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/types.h>

Go to the source code of this file.


int isfdtype (int fildes, int fdtype)

Function Documentation

int isfdtype ( int  fildes,
int  fdtype 

Definition at line 26 of file isfdtype.c.

  struct stat64 st;
  int result;

    int save_error = errno;
    result = fstat64 (fildes, &st);
    __set_errno (save_error);

  return result ?: (st.st_mode & S_IFMT) == (mode_t) fdtype;

Here is the call graph for this function: