File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -384,7 +384,11 @@ The following functions all create :ref:`socket objects <socket-objects>`.
384384 :const: `SOCK_DGRAM `, :const: `SOCK_RAW ` or perhaps one of the other ``SOCK_ ``
385385 constants. The protocol number is usually zero and may be omitted or in the
386386 case where the address family is :const: `AF_CAN ` the protocol should be one
387- of :const: `CAN_RAW ` or :const: `CAN_BCM `.
387+ of :const: `CAN_RAW ` or :const: `CAN_BCM `. If *fileno * is specified, the other
388+ arguments are ignored, causing the socket with the specified file descriptor
389+ to return. Unlike :func: `socket.fromfd `, *fileno * will return the same
390+ socket and not a duplicate. This may help close a detached socket using
391+ :meth: `socket.close() `.
388392
389393 The newly created socket is :ref: `non-inheritable <fd_inheritance >`.
390394
You can’t perform that action at this time.
0 commit comments