---
name: "rfio_fclose"
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_fclose"
---

# rfio\_fclose(3)

closes a file

## NAME

rfio\_fclose - closes a file

## SYNOPSIS

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

**int rfio\_fclose (FILE \****fd***);**

## DESCRIPTION

**rfio\_fclose** closes the file whose descriptor **fd** is the one returned by **rfio\_fopen.**

## RETURN VALUE

This routine returns 0 if successful, -1 if the operation failed and **serrno** is set appropriately.

## ERRORS

- **EBADF**

  *fd* is not a valid file descriptor.

- **SENOSHOST**

  Host unknown.

- **SENOSSERV**

  Service unknown.

- **SETIMEDOUT**

  Timed out.

- **SEBADVERSION**

  Version ID mismatch.

- **SEINTERNAL**

  Internal error.

- **SECONNDROP**

  Connection closed by remote end.

- **SECOMERR**

  Communication error.

## SEE ALSO

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

## AUTHOR

**LCG Grid Deployment** Team
