home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V6 / usr / man / man2 / close.2 < prev    next >
Encoding:
Text File  |  1975-06-26  |  654 b   |  38 lines

  1. .th CLOSE II 8/5/73
  2. .sh NAME
  3. close  \*-  close a file
  4. .sh SYNOPSIS
  5. (close = 6.)
  6. .br
  7. (file descriptor in r0)
  8. .br
  9. .ft B
  10. sys close
  11. .s3
  12. close(fildes)
  13. .s3
  14. .ft R
  15. .sh DESCRIPTION
  16. Given
  17. a file descriptor such as returned from an
  18. .it open,
  19. .it creat,
  20. or
  21. .it pipe
  22. call,
  23. .it close
  24. closes the associated file.
  25. A close of all files is automatic on
  26. .it exit,
  27. but since
  28. processes are limited to 15 simultaneously open files,
  29. .it close
  30. is necessary for programs which deal with many files.
  31. .sh "SEE ALSO"
  32. creat (II), open (II), pipe (II)
  33. .sh DIAGNOSTICS
  34. The error bit
  35. (c-bit) is set for an unknown file descriptor.
  36. From C a \*-1 indicates an error, 0 indicates
  37. success.
  38.