summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2015-12-06 12:54:45 -0800
committerJeff Forcier <jeff@bitprophet.org>2015-12-06 12:54:45 -0800
commitd3f673742eccc1dadc80bfdcf1e8a7a2e7348969 (patch)
tree064f0717472d3beebd019c20151499dd3b840d94
parent2f686618c1b0d629c8415a91e93c94e7ae527599 (diff)
parent2dbf4bfc9435db1ab3f79f40119511153656a5eb (diff)
Merge branch '1.16'
-rw-r--r--paramiko/channel.py14
-rw-r--r--paramiko/packet.py7
2 files changed, 17 insertions, 4 deletions
diff --git a/paramiko/channel.py b/paramiko/channel.py
index 057b417b..070009f8 100644
--- a/paramiko/channel.py
+++ b/paramiko/channel.py
@@ -286,7 +286,8 @@ class Channel (ClosingContextManager):
return an exit status in some cases (like bad servers).
:return:
- ``True`` if `recv_exit_status` will return immediately, else ``False``.
+ ``True`` if `recv_exit_status` will return immediately, else
+ ``False``.
.. versionadded:: 1.7.3
"""
@@ -300,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
diff --git a/paramiko/packet.py b/paramiko/packet.py
index 2be2bb2b..89a514d1 100644
--- a/paramiko/packet.py
+++ b/paramiko/packet.py
@@ -204,9 +204,10 @@ class Packetizer (object):
def handshake_timed_out(self):
"""
Checks if the handshake has timed out.
- If `start_handshake` wasn't called before the call to this function
- the return value will always be `False`.
- If the handshake completed before a time out was reached the return value will be `False`
+
+ If `start_handshake` wasn't called before the call to this function,
+ the return value will always be `False`. If the handshake completed
+ before a timeout was reached, the return value will be `False`
:return: handshake time out status, as a `bool`
"""