diff options
author | Hans Nilsson <[email protected]> | 2018-02-22 12:11:05 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2018-02-22 12:11:05 +0100 |
commit | 398dcda0815f12fb177bbb3bf68f6b424c2a62f2 (patch) | |
tree | 28cdd37f4c77fae6e7999507b07485fbd2e04cbb /lib/ssh/src/ssh_channel_sup.erl | |
parent | 4a319977e7f8578435a97e700bebf65b3ee49992 (diff) | |
parent | 13c6a4bf01d39a5002e09ef1f82619cde9f2c90c (diff) | |
download | otp-398dcda0815f12fb177bbb3bf68f6b424c2a62f2.tar.gz otp-398dcda0815f12fb177bbb3bf68f6b424c2a62f2.tar.bz2 otp-398dcda0815f12fb177bbb3bf68f6b424c2a62f2.zip |
Merge branch 'maint-20' into maint
* maint-20:
Updated OTP version
Prepare release
ssh: Add option save_accepted_host
ssh: No error message for signal kill
ssh: Dont repeat supervisor defaults in map fields
ssh: Move starting of channel child to ssh_channel_sup
ssh: Test case for sup tree when shell server proc times out
Diffstat (limited to 'lib/ssh/src/ssh_channel_sup.erl')
-rw-r--r-- | lib/ssh/src/ssh_channel_sup.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/ssh/src/ssh_channel_sup.erl b/lib/ssh/src/ssh_channel_sup.erl index 6b01dc334d..8444533fd1 100644 --- a/lib/ssh/src/ssh_channel_sup.erl +++ b/lib/ssh/src/ssh_channel_sup.erl @@ -26,7 +26,7 @@ -behaviour(supervisor). --export([start_link/1, start_child/2]). +-export([start_link/1, start_child/5]). %% Supervisor callback -export([init/1]). @@ -37,7 +37,14 @@ start_link(Args) -> supervisor:start_link(?MODULE, [Args]). -start_child(Sup, ChildSpec) -> +start_child(Sup, Callback, Id, Args, Exec) -> + ChildSpec = + #{id => make_ref(), + start => {ssh_channel, start_link, [self(), Id, Callback, Args, Exec]}, + restart => temporary, + type => worker, + modules => [ssh_channel] + }, supervisor:start_child(Sup, ChildSpec). %%%========================================================================= |