view docs/ccguide/close.refentry @ 2798:b70d93f8d7ce lwtools-port

Updated coco1/modules/makefile and coco3/modules/makefile to help resolve issues with i(x) and s(x) descriptors. Updated level1/coco1/modules/makefile & level2/coco3/modules/makefile so that correct values would be sent to assembler when building superdesc.asm for s(x).dd and i(x).dd descriptors.
author drencor-xeen
date Mon, 28 Jan 2013 16:13:05 -0600
parents 3339ee2e58bc
children
line wrap: on
line source

<refentry id="close">
<refnamediv>
<refname>Close</refname>
<refpurpose>close a file</refpurpose>
</refnamediv>

<refsynopsisdiv>
<funcsynopsis>
<funcprototype>
  <funcdef><function>close</function></funcdef>
  <paramdef>int <parameter>pn</parameter></paramdef>
</funcprototype>
</funcsynopsis>

</refsynopsisdiv>

<refsect1><title>Assembler Equivalent</title>
<para>
os9 I$CLOSE
</para>
</refsect1>

<refsect1><title>Description</title>
<para>
Close takes a path number, "pn", as returned from system calls
"open()", "creat()", or "dup()", and closes the associated
file.
</para>
<para>
Termination of a task always closes all open files
automatically, but it is necessary to close files where
multiple files are opened by the task, and it is desired to
re-use path numbers to avoid going over the system or process
path number limit.
</para>
</refsect1>

<refsect1><title>See Also</title>
<para>
<link linkend="creat">creat()</link>,
<link linkend="open">open()</link>,
<link linkend="dup">dup()</link>
</para>
</refsect1>
</refentry>