Files
oldlinux-files/Ref-docs/syscalls/syscalls_9.html
2024-02-19 00:21:47 -05:00

29 lines
1.3 KiB
HTML

<html><!-- This HTML file has been created by texi2html 1.29
from syscalls.texi on 4 June 1994 -->
<TITLE>Syscall specifications of Linux - close</TITLE>
<P>Go to the <A HREF="syscalls_8.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_8.html">previous</A>, <A HREF="syscalls_10.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_10.html">next</A> section.<P>
<H2><A NAME="SEC9" HREF="syscalls_toc.html#SEC9" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_toc.html#SEC9">close</A></H2>
<P>
<H3>SYNOPSIS</H3>
<P>
<CODE>int close(int <VAR>fd</VAR>);</CODE>
<P>
<H3>PARAMETERS</H3>
<P>
<VAR>fd</VAR>: [in] the file descriptor to close.
<P>
<H3>DESCRIPTION</H3>
<P>
Closes the file descriptor <VAR>fd</VAR>. If <VAR>fd</VAR> is the last file
descriptor refering to a file, then the ressources associated with that
file are deallocated. The lock held on the file by the current task are
released.
<P>
<H3>RETURN VALUE</H3>
<P>
On success zero is returned. On error, -1 is returned and <CODE>errno</CODE> is
set to <CODE>EBADF</CODE>.
<P>
<P>Go to the <A HREF="syscalls_8.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_8.html">previous</A>, <A HREF="syscalls_10.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_10.html">next</A> section.<P>