*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> shutdown (2)              
Title
Content
Arch
Section
 

SHUTDOWN(2)

Contents


NAME    [Toc]    [Back]

     shutdown -- shut down part of a full-duplex connection

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <sys/types.h>
     #include <sys/socket.h>

     int
     shutdown(int s, int how);

DESCRIPTION    [Toc]    [Back]

     The shutdown() system call causes all or part of a full-duplex connection
     on the socket associated with the file descriptor s to be shut down.  The
     how argument specifies the type of shutdown.  Possible values are:

     SHUT_RD	further receives will be disallowed.

     SHUT_WR	further sends will be disallowed.

     SHUT_RDWR	further sends and receives will be disallowed.

RETURN VALUES    [Toc]    [Back]

     The shutdown() function returns the value 0 if successful; otherwise the
     value -1 is returned and the global variable errno is set to indicate the
     error.

ERRORS    [Toc]    [Back]

     The shutdown() system call fails if:

     [EBADF]		The s argument is not a valid file descriptor.

     [EINVAL]		The how argument is invalid.

     [ENOTCONN] 	The socket is not connected.

     [ENOTSOCK] 	The s argument does not refer to a socket.

SEE ALSO    [Toc]    [Back]

      
      
     connect(2), socket(2)

STANDARDS    [Toc]    [Back]

     The shutdown() system call is expected to comply with IEEE Std
     1003.1g-2000 (``POSIX.1''), when finalized.

HISTORY    [Toc]    [Back]

     The shutdown() system call appeared in 4.2BSD.  The SHUT_RD, SHUT_WR, and
     SHUT_RDWR constants appeared in IEEE Std 1003.1g-2000 (``POSIX.1'').


FreeBSD 5.2.1		       February 27, 2001		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
SSL_shutdown NetBSD shut down a TLS/SSL connection
SSL_shutdown OpenBSD shut down a TLS/SSL connection
SSL_shutdown Tru64 Shut down a TLS/SSL connection
shutdown HP-UX shut down a socket
xlv_shutdown IRIX shut down XLV volumes
shutdown Tru64 Shut down socket send and receive operations
full Linux always full device
ftpshut HP-UX create shutdown message file to shut down the ftp servers at a given time
photo IRIX Full-color images
endfullscrn IRIX ends full-screen mode
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service