aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/gen_sctp.erl
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2012-05-23 11:23:54 +0200
committerLukas Larsson <[email protected]>2012-05-23 11:23:54 +0200
commit1ba2039020738673b3913be0e48d83713503a3b7 (patch)
treee62d160f353b94e076fdbec2834361034bd7318c /lib/kernel/src/gen_sctp.erl
parente4717301b73f2d7b2716b625e1b647b35d2815be (diff)
parent3e5015a959c9533582b0e4a027158ea8252f7c31 (diff)
downloadotp-1ba2039020738673b3913be0e48d83713503a3b7.tar.gz
otp-1ba2039020738673b3913be0e48d83713503a3b7.tar.bz2
otp-1ba2039020738673b3913be0e48d83713503a3b7.zip
Merge branch 'lukas/kernel/fix-gen_udp_tcp-leak/OTP-10094' into maint
* lukas/kernel/fix-gen_udp_tcp-leak/OTP-10094: Add testcase for controlling_process(P,self()) Fix port leaking after controlling_process(Port, self())
Diffstat (limited to 'lib/kernel/src/gen_sctp.erl')
-rw-r--r--lib/kernel/src/gen_sctp.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/kernel/src/gen_sctp.erl b/lib/kernel/src/gen_sctp.erl
index d8954f0cf7..8fa963ec78 100644
--- a/lib/kernel/src/gen_sctp.erl
+++ b/lib/kernel/src/gen_sctp.erl
@@ -425,9 +425,10 @@ error_string(X) ->
erlang:error(badarg, [X]).
--spec controlling_process(Socket, Pid) -> ok when
+-spec controlling_process(Socket, Pid) -> ok | {error, Reason} when
Socket :: sctp_socket(),
- Pid :: pid().
+ Pid :: pid(),
+ Reason :: closed | not_owner | inet:posix().
controlling_process(S, Pid) when is_port(S), is_pid(Pid) ->
inet:udp_controlling_process(S, Pid);