diff options
author | Anders Svensson <[email protected]> | 2011-08-24 16:44:16 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2011-08-24 16:44:16 +0200 |
commit | 3536111957c809976ed3e7091e85960990be904d (patch) | |
tree | aafc4cf4f996ece272e6b9c3d2366061c34f08da /lib/ssh/src/ssh_sftp.erl | |
parent | a7c0e439ee84d25ce18f65959be06315063a7de8 (diff) | |
parent | 0c09797c725c98e5466bf6c575b7be4f2fc0e813 (diff) | |
download | otp-3536111957c809976ed3e7091e85960990be904d.tar.gz otp-3536111957c809976ed3e7091e85960990be904d.tar.bz2 otp-3536111957c809976ed3e7091e85960990be904d.zip |
Merge remote branch 'upstream/dev' into dev
Diffstat (limited to 'lib/ssh/src/ssh_sftp.erl')
-rwxr-xr-x | lib/ssh/src/ssh_sftp.erl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/ssh/src/ssh_sftp.erl b/lib/ssh/src/ssh_sftp.erl index 59e09fdd0f..f000558100 100755 --- a/lib/ssh/src/ssh_sftp.erl +++ b/lib/ssh/src/ssh_sftp.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2010. All Rights Reserved. +%% Copyright Ericsson AB 2005-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -130,9 +130,9 @@ start_channel(Host, Port, Opts) -> end. stop_channel(Pid) -> - case process_info(Pid, [trap_exit]) of - [{trap_exit, Bool}] -> - process_flag(trap_exit, true), + case is_process_alive(Pid) of + true -> + OldValue = process_flag(trap_exit, true), link(Pid), exit(Pid, ssh_sftp_stop_channel), receive @@ -145,9 +145,9 @@ stop_channel(Pid) -> ok end end, - process_flag(trap_exit, Bool), + process_flag(trap_exit, OldValue), ok; - undefined -> + false -> ok end. |