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