---
name: "rfio_fileno"
section: "3"
platform: "linux"
package: "libdpm-dev"
version: "1.10.0-2+b3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/rfio_fileno"
---

# rfio\_fileno(3)

maps stream pointer to file descriptor

## NAME

rfio\_fileno - maps stream pointer to file descriptor

## SYNOPSIS

**#include \<sys/types.h\>**\
 **#include "rfio\_api.h"**

**int rfio\_fileno (FILE \****fp***);**

## DESCRIPTION

**rfio\_fileno** returns the integer file descriptor associated with the stream pointed to by  *fp*.

## RETURN VALUE

Upon successful completion, **rfio\_fileno()** returns the integer value of the file descriptor associated with the stream parameter.  Otherwise, the value -1 is returned and **serrno** is set appropriately.

## ERRORS

- **EBADF**

  *fp* is not a valid file descriptor.

## SEE ALSO

**[rfio\_fopen(3)](/rfio_fopen/3.md)**

## AUTHOR

**LCG Grid Deployment** Team
