shutdown - Online Linux Manual PageSection : 2
Updated : 2022-10-30
Source : Linux man-pages 6.03
NAMEshutdown − shut down part of a full-duplex connection
LIBRARYStandard C library (libc, −lc)
SYNOPSIS#include <sys/socket.h>int shutdown(int sockfd, int how);
DESCRIPTIONThe shutdown() call causes all or part of a full-duplex connection on the socket associated with sockfd to be shut down. If how is SHUT_RD, further receptions will be disallowed. If how is SHUT_WR, further transmissions will be disallowed. If how is SHUT_RDWR, further receptions and transmissions will be disallowed.
RETURN VALUEOn success, zero is returned. On error, −1 is returned, and errno is set to indicate the error.
ERRORSEBADF sockfd is not a valid file descriptor. EINVAL An invalid value was specified in how (but see BUGS). ENOTCONN The specified socket is not connected. ENOTSOCK The file descriptor sockfd does not refer to a socket.
STANDARDSPOSIX.1-2001, POSIX.1-2008, 4.4BSD (shutdown() first appeared in 4.2BSD).
NOTESThe constants SHUT_RD, SHUT_WR, SHUT_RDWR have the value 0, 1, 2, respectively, and are defined in <sys/socket.h> since glibc-2.1.91.
BUGSChecks for the validity of how are done in domain-specific code, and before Linux 3.7 not all domains performed these checks. Most notably, UNIX domain sockets simply ignored invalid values. This problem was fixed for UNIX domain sockets in Linux 3.7.
SEE ALSOclose(2), connect(2), socket(2), socket(7) 0
Johanes Gumabo
Data Size : 6,794 byte
man-shutdown.2Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 3 / 189,613
Visitor ID : :
Visitor IP : 3.15.223.129 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.