diff options
author | Per Hedeland <[email protected]> | 2012-01-04 10:57:59 +0100 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2012-01-04 15:24:08 +0100 |
commit | 949ee23d72e4412fed3059c04e395f995388a5fb (patch) | |
tree | 7806efe10aae7c0a03cf4a9bf28d9e494061c730 /lib/kernel/doc/src/gen_tcp.xml | |
parent | 34dca57472ba2f4e82bb03d3713e3318613093bb (diff) | |
download | otp-949ee23d72e4412fed3059c04e395f995388a5fb.tar.gz otp-949ee23d72e4412fed3059c04e395f995388a5fb.tar.bz2 otp-949ee23d72e4412fed3059c04e395f995388a5fb.zip |
Fix returned error from gen_tcp:accept/1,2 when running out of ports
The {error, enfile} return value is badly misleading and confusing for
this case, since the Posix ENFILE errno value has a well-defined meaning
that has nothing to do with Erlang ports. The fix changes the return
value to {error, system_limit}, which is consistent with e.g. various
file(3) functions. inet:format_error/1 has also been updated to support
system_limit in the same manner as file:format_error/1.
Diffstat (limited to 'lib/kernel/doc/src/gen_tcp.xml')
-rw-r--r-- | lib/kernel/doc/src/gen_tcp.xml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/kernel/doc/src/gen_tcp.xml b/lib/kernel/doc/src/gen_tcp.xml index 8a5d40bb16..9f362841ce 100644 --- a/lib/kernel/doc/src/gen_tcp.xml +++ b/lib/kernel/doc/src/gen_tcp.xml @@ -235,7 +235,9 @@ do_recv(Sock, Bs) -> <p>Returns <c>{ok, <anno>Socket</anno>}</c> if a connection is established, or <c>{error, closed}</c> if <c><anno>ListenSocket</anno></c> is closed, or <c>{error, timeout}</c> if no connection is established - within the specified time. May also return a POSIX error + within the specified time, + or <c>{error, system_limit}</c> if all available ports in the + Erlang emulator are in use. May also return a POSIX error value if something else goes wrong, see inet(3) for possible error values.</p> <p>Packets can be sent to the returned socket <c><anno>Socket</anno></c> |