diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2015-12-06 12:54:28 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2015-12-06 12:54:28 -0800 |
commit | d6dea28a3a100cac728e83d2a9db65b413f33025 (patch) | |
tree | 0e53e2c1b16bfa7964491e087e5b3a9e0af10eb4 | |
parent | b83e8789c9ae9f06ae9310e0f4ac8a246791394b (diff) |
Add warning to Channel.recv_exit_status re: call order.
Closes #448...kinda
-rw-r--r-- | paramiko/channel.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/paramiko/channel.py b/paramiko/channel.py index b6803f63..8a1c0f87 100644 --- a/paramiko/channel.py +++ b/paramiko/channel.py @@ -301,6 +301,17 @@ class Channel (ClosingContextManager): it does, or until the channel is closed. If no exit status is provided by the server, -1 is returned. + .. warning:: + In some situations, receiving remote output larger than the current + `.Transport` or session's ``window_size`` (e.g. that set by the + ``default_window_size`` kwarg for `.Transport.__init__`) will cause + `.recv_exit_status` to hang indefinitely if it is called prior to a + sufficiently large `.read` (or if there are no threads calling + `.read` in the background). + + In these cases, ensuring that `.recv_exit_status` is called *after* + `.read` (or, again, using threads) can avoid the hang. + :return: the exit code (as an `int`) of the process on the server. .. versionadded:: 1.2 |