The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

shutdown (2)
  • shutdown (1) ( Solaris man: Команды и прикладные программы пользовательского уровня )
  • shutdown (1) ( Русские man: Команды и прикладные программы пользовательского уровня )
  • >> shutdown (2) ( FreeBSD man: Системные вызовы )
  • shutdown (2) ( Русские man: Системные вызовы )
  • shutdown (2) ( Linux man: Системные вызовы )
  • shutdown (3) ( Solaris man: Библиотечные вызовы )
  • shutdown (3) ( POSIX man: Библиотечные вызовы )
  • shutdown (8) ( FreeBSD man: Команды системного администрирования )
  • shutdown (8) ( Linux man: Команды системного администрирования )

  • BSD mandoc
     

    NAME

    
    
    shutdown
    
     - disable sends and/or receives on a socket
    
     
    

    LIBRARY

    Lb libc
    
     
    

    SYNOPSIS

       #include <sys/types.h>
       #include <sys/socket.h>
    int shutdown (int s int how);
     

    DESCRIPTION

    The shutdown ();
    system call disables sends or receives on a socket. The Fa how argument specifies the type of shutdown. Possible values are:

    SHUT_RD
    Further receives will be disallowed.
    SHUT_WR
    Further sends will be disallowed. This may cause actions specific to the protocol family of the socket Fa s to happen; see Sx IMPLEMENTATION NOTES .
    SHUT_RDWR
    Further sends and receives will be disallowed. Implies SHUT_WR

    If the file descriptor Fa s is associated with a SOCK_STREAM socket, all or part of the full-duplex connection will be shut down.  

    IMPLEMENTATION NOTES

    The following protocol specific actions apply to the use of SHUT_WR (and potentially also SHUT_RDWR ) based on the properties of the socket associated with the file descriptor Fa s .

    Domain Ta Type Ta Protocol Ta Return value and action
    PF_INET Ta SOCK_DGRAM Ta IPPROTO_SCTP Ta Return -1.
    The global variable errno will be set to Er EOPNOTSUPP .
    PF_INET Ta SOCK_DGRAM Ta IPPROTO_UDP Ta Return 0.
    ICMP messages will not be generated.
    PF_INET Ta SOCK_STREAM Ta IPPROTO_SCTP Ta Return 0.
    Send queued data and tear down association.
    PF_INET Ta SOCK_STREAM Ta IPPROTO_TCP Ta Return 0.
    Send queued data, wait for ACK, then send FIN.
    PF_INET6 Ta SOCK_DGRAM Ta IPPROTO_SCTP Ta Return -1.
    The global variable errno will be set to Er EOPNOTSUPP .
    PF_INET6 Ta SOCK_DGRAM Ta IPPROTO_UDP Ta Return 0.
    ICMP messages will not be generated.
    PF_INET6 Ta SOCK_STREAM Ta IPPROTO_SCTP Ta Return 0.
    Send queued data and tear down association.
    PF_INET6 Ta SOCK_STREAM Ta IPPROTO_TCP Ta Return 0.
    Send queued data, wait for ACK, then send FIN.

     

    RETURN VALUES

    Rv -std shutdown  

    ERRORS

    The shutdown ();
    system call fails if:

    Bq Er EBADF
    The Fa s argument is not a valid file descriptor.
    Bq Er EINVAL
    The Fa how argument is invalid.
    Bq Er EOPNOTSUPP
    The socket associated with the file descriptor Fa s does not support this operation.
    Bq Er ENOTCONN
    The Fa s argument specifies a SOCK_STREAM socket which is not connected.
    Bq Er ENOTSOCK
    The Fa s argument does not refer to a socket.

     

    SEE ALSO

    connect(2), socket(2), inet(4), inet6(4)  

    STANDARDS

    The shutdown ();
    system call is expected to comply with St -p1003.1g-2000 , when finalized.  

    HISTORY

    The shutdown ();
    system call appeared in BSD 4.2 The SHUT_RD , SHUT_WR and SHUT_RDWR constants appeared in St -p1003.1g-2000 .  

    AUTHORS

    An -nosplit This manual page was updated by An Bruce M. Simpson Aq [email protected] to reflect how shutdown ();
    behaves with PF_INET and PF_INET6 sockets.  

    BUGS

    The ICMP ``port unreachable '' message should be generated in response to datagrams received on a local port to which Fa s is bound after shutdown ();
    is called.


     

    Index

    NAME
    LIBRARY
    SYNOPSIS
    DESCRIPTION
    IMPLEMENTATION NOTES
    RETURN VALUES
    ERRORS
    SEE ALSO
    STANDARDS
    HISTORY
    AUTHORS
    BUGS


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру