[ python-Bugs-1101756 ] popen4/cygwin ssh hangs
SourceForge.net
noreply at sourceforge.net
Mon Oct 3 14:36:03 CEST 2005
Bugs item #1101756, was opened at 2005-01-13 07:21
Message generated for change (Settings changed) made by jlt63
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1101756&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Threads
Group: None
>Status: Closed
>Resolution: Works For Me
Priority: 5
Submitted By: Ph.E (ph_e)
Assigned to: Jason Tishler (jlt63)
Summary: popen4/cygwin ssh hangs
Initial Comment:
The following python code hangs on executing cmd2
(works with cmd1).
The commands works fine when executed on a shell.
I have the same problem with Python 2.3.4 and 2.4
(Windows).
I use the latest Cygwin binaries
import os
cmd1 = "bin\ssh"
cmd2 = "bin\ssh -i id_dsa admin at myserver.com uptime"
def docmd(cmd):
print "Doing %s ..." % cmd
(stdin, stdouterr) = os.popen4(cmd)
for line in stdouterr.readlines():
print line
stdin.close()
stdouterr.close()
print "Done."
if __name__ == '__main__':
docmd(cmd1)
docmd(cmd2)
Give me some advice for testing (popen, linux, ...).
----------------------------------------------------------------------
>Comment By: Jason Tishler (jlt63)
Date: 2005-10-03 04:36
Message:
Logged In: YES
user_id=86216
AFAICT, this works for me under Cygwin 1.5.18 and Python
2.4.1:
$ python /tmp/sf.py
Doing ssh ...
usage: ssh [-1246AaCfgkMNnqsTtVvXxY] [-b bind_address] [-
c cipher_spec]
[-D port] [-e escape_char] [-F configfile]
[-i identity_file] [-L [bind_address:]port:host:hostport]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o
option] [-p port]
[-R [bind_address:]port:host:hostport] [-S ctl_path]
[user@]hostname [command]
Done.
Doing ssh -i id_rsa server uptime ...
8:29am up 1 day(s), 1:53, 5 users, load average: 0.41,
0.52, 0.59
Done.
Note I changed cmd1 and cmd2 also follows:
cmd1 = "ssh"
cmd2 = "ssh -i id_rsa server uptime"
I'm closing this bug report. Please reopen if this is still
a problem.
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2005-09-29 21:36
Message:
Logged In: YES
user_id=33168
Jason?
----------------------------------------------------------------------
Comment By: Ph.E (ph_e)
Date: 2005-01-13 08:33
Message:
Logged In: YES
user_id=1196530
The same code in Linux Python 2.3.4 works fine.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1101756&group_id=5470
More information about the Python-bugs-list
mailing list