From 7c300789fffeacb24f1d00aa6e0797e06166c3c6 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 3 Jun 2016 11:59:54 +0200 Subject: kernel: Better explain controlling_process' tcp behaviour --- lib/kernel/doc/src/gen_tcp.xml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/kernel/doc/src') diff --git a/lib/kernel/doc/src/gen_tcp.xml b/lib/kernel/doc/src/gen_tcp.xml index 8bd94892ad..15a2f02c76 100644 --- a/lib/kernel/doc/src/gen_tcp.xml +++ b/lib/kernel/doc/src/gen_tcp.xml @@ -223,6 +223,14 @@ do_recv(Sock, Bs) -> that receives messages from the socket. If called by any other process than the current controlling process, {error, not_owner} is returned.

+

If the socket is set in active mode, this function + will transfer any messages in the mailbox of the caller + to the new controlling process. + If any other process is interacting with the socket while + the transfer is happening, the transfer may not work correctly + and messages may remain in the caller's mailbox. For instance + changing the sockets active mode before the transfere is complete + may cause this.

-- cgit v1.2.3