File:  [MW Coherent from dump] / coherent / a / usr / man / MULTI / close
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:34 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent



close()                COHERENT System Call               close()




Close a file

iinntt cclloossee(_f_d) iinntt _f_d;

close closes the file identified by the file descriptor _f_d, which
was returned by ccrreeaatt, dduupp,  ooppeenn, or ppiippee.  close also frees the
associated file descriptor.

Because each program can have only a limited number of files open
at any given time,  programs that process many files should close
files whenever  possible.  The function  exit automatically calls
fclose for  all open files;  however, the system  call _exit does
not.

***** Example *****

For an example of this function, see the entry for open.

***** See Also *****

COHERENT system calls, creat(), open()

***** Diagnostics *****

close returns -1  if an error occurs, such as  its being handed a
bad file descriptor; otherwise, it returns zero.






























COHERENT Lexicon                                           Page 1



unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.