Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ close(3spp) — UMIPS/BSD System Programmer's Package 2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

open(3spp)

read(3spp)

write(3spp)

ioctl(3spp)

lseek(3spp)

CLOSE(3spp)

NAME

close − delete a descriptor

SYNOPSIS

close(d)
int d;

DESCRIPTION

The close call deletes a file descriptor and performs any device driver defined activity necessary when terminating access to the file. 

A close of all of a standalone programs descriptors is automatic on exit, but since there is a limit on the number of active descriptors per process, close is necessary for programs that deal with many descriptors. 

RETURN VALUE

Upon successful completion, a value of 0 is returned.  Otherwise, a value of −1 is returned and the global integer variable errno is set to indicate the error. 

ERRORS

Close will fail if:

[EBADF] D is not an active descriptor. 

SEE ALSO

open(3spp), read(3spp), write(3spp), ioctl(3spp), lseek(3spp)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026