Re: Executing ssh from perl

2004-11-23 Thread Adrian Corduneanu
Hi Stephen, The last two versions of Cygwin (1.5.11 and 1.5.12) contain a known pipe incompatibility with Windows Service Pack 2. Many native Windows applications that call ssh do not work now. Some of the affected applications are 'unison', and 'cvs'. You just pointed out that native Perl also

Re: Executing ssh from perl

2004-11-22 Thread Stephen Studley
At 12:33 PM -0500 11/22/04, Igor Pechtchanski wrote: That's probably the best you could hope for at this point. If you want to know why the original program didn't work as expected, you should really ask the distributor of your Windows perl version (ActiveState?) and not this list. Igor Un

Re: Executing ssh from perl

2004-11-22 Thread Igor Pechtchanski
On Sat, 20 Nov 2004, Stephen Studley wrote: > At 1:28 AM +0100 11/20/04, Gerrit P. Haase wrote: > > Stephen Studley wrote: > > > > > At 4:30 PM -0500 11/18/04, Igor Pechtchanski wrote: > > > > perl -we 'my $str=`ssh -n [EMAIL PROTECTED] ls`;print "[$str]\n"' > > > good idea, however same results,

Re: Executing ssh from perl

2004-11-20 Thread Stephen Studley
At 1:28 AM +0100 11/20/04, Gerrit P. Haase wrote: Stephen Studley wrote: At 4:30 PM -0500 11/18/04, Igor Pechtchanski wrote: perl -we 'my $str=`ssh -n [EMAIL PROTECTED] ls`;print "[$str]\n"' good idea, however same results, at least from my Windows machine. The command-line perl works fine from my

Re: Executing ssh from perl

2004-11-19 Thread Gerrit P. Haase
Stephen Studley wrote: one very interesting discovery. If the command fails, it returns! It would appear it hangs only when the command succeeds. If I mangle the path to the ls command, ssh returns with file not found. $ perl -we 'my $str=`ssh -n [EMAIL PROTECTED] ls`;print "[$str]\n"' Enter pass

Re: Executing ssh from perl

2004-11-19 Thread Gerrit P. Haase
Stephen Studley wrote: At 4:30 PM -0500 11/18/04, Igor Pechtchanski wrote: perl -we 'my $str=`ssh -n [EMAIL PROTECTED] ls`;print "[$str]\n"' good idea, however same results, at least from my Windows machine. The command-line perl works fine from my OSX machine. $ perl -we 'my $str=`ssh -n [EMAIL PR

Re: Executing ssh from perl

2004-11-19 Thread Igor Pechtchanski
On Thu, 18 Nov 2004, Stephen Studley wrote: > At 4:30 PM -0500 11/18/04, Igor Pechtchanski wrote: > > On Thu, 18 Nov 2004, Stephen Studley wrote: > > > At 3:39 PM -0500 11/18/04, Igor Pechtchanski wrote: > > I suppose the next step is to try to reproduce this in a command-line perl > > invocation

Re: Executing ssh from perl

2004-11-18 Thread Stephen Studley
one very interesting discovery. If the command fails, it returns! It would appear it hangs only when the command succeeds. If I mangle the path to the ls command, ssh returns with file not found. At 4:30 PM -0500 11/18/04, Igor Pechtchanski wrote: On Thu, 18 Nov 2004, Stephen Studley wrote: > A

Re: Executing ssh from perl

2004-11-18 Thread Yitzchak Scott-Thoennes
On Thu, Nov 18, 2004 at 12:56:19PM -0800, Stephen Studley wrote: > If I use system(""); instead of ``;, the command returns 0, > (no hang). Unfortunately system wont work for my needs, as it is > critical I evaluate stdout:stderr. `` doesn't capture stderr; maybe you want IPC::Open3 -- Unsubsc

Re: Executing ssh from perl

2004-11-18 Thread Stephen Studley
At 4:30 PM -0500 11/18/04, Igor Pechtchanski wrote: On Thu, 18 Nov 2004, Stephen Studley wrote: > At 3:39 PM -0500 11/18/04, Igor Pechtchanski wrote: I suppose the next step is to try to reproduce this in a command-line perl invocation, e.g., something like perl -we 'my $str=`ssh -n [EMAIL PROTECT

Re: Executing ssh from perl

2004-11-18 Thread Igor Pechtchanski
On Thu, 18 Nov 2004, Stephen Studley wrote: > At 3:39 PM -0500 11/18/04, Igor Pechtchanski wrote: > > > unfortunately, no change in my results. > > > BTW: I have ssh configured for passwordless connection. > > > > You *did* properly escape the command string, right? Otherwise, > > > > my $str =

Re: Executing ssh from perl

2004-11-18 Thread Stephen Studley
At 3:39 PM -0500 11/18/04, Igor Pechtchanski wrote: > unfortunately, no change in my results. BTW: I have ssh configured for passwordless connection. You *did* properly escape the command string, right? Otherwise, my $str = `ssh -n [EMAIL PROTECTED] ls`; will try to interpolate the contents of t

Re: Executing ssh from perl

2004-11-18 Thread Igor Pechtchanski
On Thu, 18 Nov 2004, Stephen Studley wrote: > At 2:12 PM -0500 11/18/04, Igor Pechtchanski wrote: > > On Thu, 18 Nov 2004, Stephen Studley wrote: > > > The successful scenario simply returns the expect stdout: > > > debug3: channel 0: will not send data after close > > > / > > > > > > Thanks i

Re: Executing ssh from perl

2004-11-18 Thread Stephen Studley
At 2:12 PM -0500 11/18/04, Igor Pechtchanski wrote: On Thu, 18 Nov 2004, Stephen Studley wrote: > The successful scenario simply returns the expect stdout: debug3: channel 0: will not send data after close / Thanks in advance. Stephen Try giving the "-n" argument to ssh. unfortunately, no chan

Re: Executing ssh from perl

2004-11-18 Thread Igor Pechtchanski
On Thu, 18 Nov 2004, Stephen Studley wrote: > Apologies in advance if this a well covered issue, as I'm pretty sure it has > been. I did look through the lists email archive and found too many variations > on similar issues to be helpful. > > Problem: ssh command hangs when executed from perl scri

Executing ssh from perl

2004-11-18 Thread Stephen Studley
Apologies in advance if this a well covered issue, as I'm pretty sure it has been. I did look through the lists email archive and found too many variations on similar issues to be helpful. Problem: ssh command hangs when executed from perl script using back-tics. The same command (no back-tics)