]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man2/shutdown.2
copy_file_range.2: tfix
[thirdparty/man-pages.git] / man2 / shutdown.2
index 3db91ead92d9fa7178d918afc9993e4daf6029b5..9c85fa1fa12a9f244d87b713492944002fd4a70c 100644 (file)
 .\" Modified Tue Oct 22 22:04:51 1996 by Eric S. Raymond <esr@thyrsus.com>
 .\" Modified 1998 by Andi Kleen
 .\"
-.TH SHUTDOWN 2 2012-09-06 "Linux" "Linux Programmer's Manual"
+.TH SHUTDOWN 2 2018-04-30 "Linux" "Linux Programmer's Manual"
 .SH NAME
 shutdown \- shut down part of a full-duplex connection
 .SH SYNOPSIS
 .B #include <sys/socket.h>
-.sp
+.PP
 .BI "int shutdown(int " sockfd ", int " how );
 .SH DESCRIPTION
 The
@@ -75,7 +75,7 @@ is set appropriately.
 .TP
 .B EBADF
 .I sockfd
-is not a valid descriptor.
+is not a valid file descriptor.
 .TP
 .B EINVAL
 An invalid value was specified in
@@ -86,12 +86,13 @@ An invalid value was specified in
 The specified socket is not connected.
 .TP
 .B ENOTSOCK
+The file descriptor
 .I sockfd
-is a file, not a socket.
+does not refer to a socket.
 .SH CONFORMING TO
-POSIX.1-2001, 4.4BSD (the
-.BR shutdown ()
-function call first appeared in 4.2BSD).
+POSIX.1-2001, POSIX.1-2008, 4.4BSD
+.RB ( shutdown ()
+first appeared in 4.2BSD).
 .SH NOTES
 The constants
 .BR SHUT_RD ,
@@ -102,15 +103,18 @@ respectively, and are defined in
 .I <sys/socket.h>
 since glibc-2.1.91.
 .SH BUGS
-As currently implemented,
-checks for the validity of
+Checks for the validity of
 .I how
-are done in domain-specific code, and not all domains perform these checks.
-.\" FIXME
+are done in domain-specific code,
+and before Linux 3.7 not all domains performed these checks.
 .\" https://bugzilla.kernel.org/show_bug.cgi?id=47111
-Most notably, UNIX domain sockets simply ignore invalid values;
-this may change in the future.
+Most notably, UNIX domain sockets simply ignored invalid values.
+This problem was fixed for UNIX domain sockets
+.\" commit fc61b928dc4d72176cf4bd4d30bf1d22e599aefc
+.\" and for DECnet sockets in commit 46b66d7077b89fb4917ceef19b3f7dd86055c94a
+in Linux 3.7.
 .SH SEE ALSO
+.BR close (2),
 .BR connect (2),
 .BR socket (2),
 .BR socket (7)