diff options
author | Georg Brandl <georg@python.org> | 2006-04-01 07:33:08 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-04-01 07:33:08 (GMT) |
commit | dcfdae7d72177d2897e3bd0eb4d3ef19dc51df08 (patch) | |
tree | e3c76b51f0dcc1e4c51c6b907262c4ea5efd0211 /Doc | |
parent | e071b001cacb81202fba0d20c03f45a9bd60d78d (diff) | |
download | cpython-dcfdae7d72177d2897e3bd0eb4d3ef19dc51df08.zip cpython-dcfdae7d72177d2897e3bd0eb4d3ef19dc51df08.tar.gz cpython-dcfdae7d72177d2897e3bd0eb4d3ef19dc51df08.tar.bz2 |
Bug #1460564: document that socket.fromfd() duplicates the given
file descriptor.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libsocket.tex | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/lib/libsocket.tex b/Doc/lib/libsocket.tex index 04d467a..c7b656d 100644 --- a/Doc/lib/libsocket.tex +++ b/Doc/lib/libsocket.tex @@ -317,10 +317,11 @@ Availability: \UNIX. \versionadded{2.4} \end{funcdesc} \begin{funcdesc}{fromfd}{fd, family, type\optional{, proto}} -Build a socket object from an existing file descriptor (an integer as -returned by a file object's \method{fileno()} method). Address family, -socket type and protocol number are as for the \function{socket()} function -above. The file descriptor should refer to a socket, but this is not +Duplicate the file descriptor \var{fd} (an integer as returned by a file +object's \method{fileno()} method) and build a socket object from the +result. Address family, socket type and protocol number are as for the +\function{socket()} function above. +The file descriptor should refer to a socket, but this is not checked --- subsequent operations on the object may fail if the file descriptor is invalid. This function is rarely needed, but can be used to get or set socket options on a socket passed to a program as |