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

44 lines
1.5 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 - shutdown</TITLE>
<P>Go to the <A HREF="syscalls_52.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_52.html">previous</A>, <A HREF="syscalls_54.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_54.html">next</A> section.<P>
<H2><A NAME="SEC53" HREF="syscalls_toc.html#SEC53" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_toc.html#SEC53">shutdown</A></H2>
<P>
<H3>SYNOPSIS</H3>
<P>
<CODE>int shutdown(int <VAR>s</VAR>, int <VAR>how</VAR>);</CODE>
<P>
<H3>PARAMETERS</H3>
<P>
<VAR>s</VAR>: [in] the socket to shutdown.
<P>
<VAR>how</VAR>: [in] how to do it.
<P>
<H3>DESCRIPTION</H3>
<P>
Terminates the communication on a socket. The possible values for
<VAR>how</VAR> are:
<P>
<DL COMPACT>
<DT><CODE>0</CODE>
<DD>the socket can no longer receive.
<P>
<DT><CODE>1</CODE>
<DD>the socket can no longer send.
<P>
<DT><CODE>2</CODE>
<DD>the socket can no longer receive or send.
</DL>
<P>
<H3>RETURN VALUE</H3>
<P>
On success zero is returned. On error, -1 is returned and <CODE>errno</CODE> is
set to one of the following values:
<P>
<UL>
<LI><CODE>EBADF</CODE>, <CODE>ENOTSOCK</CODE> or <CODE>ENOTCONN</CODE>.
</UL>
<P>
<P>Go to the <A HREF="syscalls_52.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_52.html">previous</A>, <A HREF="syscalls_54.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_54.html">next</A> section.<P>