HP-UX Reference (11i v2 07/12) - 2 System Calls (vol 5)
s
shutdown(2) shutdown(2)
still leaving the socket descriptor open, so that the caller can receive back any data SCTP was unable to
deliver.
Note: SCTP is only available when the SCTP optional bundle is installed.
RETURN VALUE
Upon successful completion, shutdown() returns 0. Otherwise it returns
-1 and errno is set to indi-
cate the error.
ERRORS
shutdown() fails if any of the following conditions are encountered:
[EBADF] s is not a valid file descriptor.
[EINVAL]
HP-UX BSD Sockets only. The specified socket is not connected.
[EINVAL]
_XOPEN_SOURCE_EXTENDED only.
The how argument is invalid.
[ENOTCONN]
_XOPEN_SOURCE_EXTENDED only.
The specified socket is not connected.
[ENOPROTOOPT] The remote system or an intermediate system in the communications path does not
support a protocol option sent by the local system. This option may have been set
using a
getsockopt or setsockopt() call, or set as a system parameter.
[ENOTSOCK] s is a valid file descriptor, but it is not a socket.
FUTURE DIRECTION
Currently, the default behavior is the HP-UX BSD Sockets; however, it might be changed to X/Open
Sockets in a future release. At that time, any HP-UX BSD Sockets behavior that is incompatible with
X/Open Sockets might be obsoleted. Applications that conform to the X/Open specification now will avoid
migration problems (see xopen_networking(7)).
AUTHOR
shutdown() was developed by HP and the University of California, Berkeley.
SEE ALSO
close(2), connect(2), socket(2), xopen_networking(7).
STANDARDS CONFORMANCE
shutdown() : XPG4
404 Hewlett-Packard Company − 2 − HP-UX 11i Version 2: December 2007 Update