close(3)

DESCRIPTION

Closes fd. Other descriptors referring to the same open file description remain valid.

SYNOPSIS

#include <unistd.h>

int close(int fd);

RETURN VALUE

  • Returns zero, or -1 and sets errno.

ERRORS

  • -EBADF
    • Fd does not refer to an open descriptor.

NOTES

The call waits for the underlying asynchronous close operation.