1CLOSE(2)                      System Calls Manual                     CLOSE(2)
2
3
4

NAME

6       close  -  close a file
7

SYNOPSIS

9       close(fildes)
10

DESCRIPTION

12       Given  a  file  descriptor such as returned from an open, creat, dup or
13       pipe(2) call, close closes the associated file.  A close of  all  files
14       is  automatic on exit, but since there is a limit on the number of open
15       files per process, close is necessary for programs which deal with many
16       files.
17
18       Files  are  closed  upon  termination  of  a  process, and certain file
19       descriptors may be closed by exec(2) (see ioctl(2)).
20

SEE ALSO

22       creat(2), open(2), pipe(2), exec(2), ioctl(2)
23

DIAGNOSTICS

25       Zero is returned if a file is closed; -1 is  returned  for  an  unknown
26       file descriptor.
27

ASSEMBLER

29       (close = 6.)
30       (file descriptor in r0)
31       sys close
32
33                                                                      CLOSE(2)
Impressum