Skip Menu |

This queue is for tickets about the Net-SSH-Expect CPAN distribution.

Report information
The Basics
Id: 30054
Status: resolved
Priority: 0/
Queue: Net-SSH-Expect

People
Owner: Nobody in particular
Requestors: danielmcbrearty [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: "use Net::SSH::Expect" breaks other code that uses "open"
This bug is described at perlmonks.com - see http://perlmonks.org/?node_id=645156 Basically, using this module (even though no code within it is called) can break other code that uses open and a pipe to control an external process. This only happens when the call to open is an external perl module. The behaviour has been confirmed by other perl monks, one of whom has suggested a probable cause (I haven't yet had time to check that). For a full description, please refer to the link above. Thanks Daniel
Subject: test.pl
#!/usr/bin/perl -w use strict; use Net::SSH::Expect; use TestExt; use Data::Dumper; package Test; sub run { my $cmd = 'ls -al'; my $pid = open OUT, "$cmd |" or die "cannot fork: $!"; print "running \"$cmd\" (pid = $pid) ... \n"; my @a = <OUT>; print "closing ... \n"; close OUT or die "cannot close: $! $?"; print @a; } package main; my @a = Test->run(); print @a;
Subject: TestExt.pm
package TestExt; sub run { my $cmd = 'ls -al'; my $pid = open OUT, "$cmd |" or die "cannot fork: $!"; print "running \"$cmd\" (pid = $pid) ... \n"; my @a = <OUT>; print "closing ... \n"; close OUT or die "cannot close: $! $?"; print @a; } 1;
Subject: Re: [rt.cpan.org #30054] "use Net::SSH::Expect" breaks other code that uses "open"
Date: Wed, 17 Oct 2007 08:15:16 -0300
To: bug-Net-SSH-Expect [...] rt.cpan.org
From: "Bruno Negrao" <bnegrao [...] gmail.com>
Hello Daniel, It looks like he found the cause, would you test that and confirm it to me? (i'm busy now with other things) When you confirm i'll remove that from my module and i'll republish is with other small changes that other people requested. Regards, bruno On 10/17/07, danielmcbrearty@gmail.com via RT <bug-Net-SSH-Expect@rt.cpan.org> wrote: Show quoted text
> > Wed Oct 17 07:08:02 2007: Request 30054 was acted upon. > Transaction: Ticket created by danielmcbrearty@gmail.com > Queue: Net-SSH-Expect > Subject: "use Net::SSH::Expect" breaks other code that uses "open" > Broken in: (no value) > Severity: Important > Owner: Nobody > Requestors: danielmcbrearty@gmail.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=30054 > > > > This bug is described at perlmonks.com - see > http://perlmonks.org/?node_id=645156 > > Basically, using this module (even though no code within it is called) > can break other code that uses open and a pipe to control an external > process. This only happens when the call to open is an external perl module. > > The behaviour has been confirmed by other perl monks, one of whom has > suggested a probable cause (I haven't yet had time to check that). > > For a full description, please refer to the link above. > > > Thanks > > Daniel > > >
Subject: Re: [rt.cpan.org #30054] "use Net::SSH::Expect" breaks other code that uses "open"
Date: Wed, 17 Oct 2007 14:12:22 +0200
To: bug-Net-SSH-Expect [...] rt.cpan.org
From: "Daniel McBrearty" <danielmcbrearty [...] gmail.com>
Hi Bruno I will do, it may take a few days though as I am working on other things for a bit regards D On 10/17/07, Bruno Negrao via RT <bug-Net-SSH-Expect@rt.cpan.org> wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=30054 > > > Hello Daniel, > > It looks like he found the cause, would you test that and confirm it to me? > (i'm busy now with other things) > > When you confirm i'll remove that from my module and i'll republish is > with other small changes that other people requested. > > Regards, > > bruno > > On 10/17/07, danielmcbrearty@gmail.com via RT > <bug-Net-SSH-Expect@rt.cpan.org> wrote:
> > > > Wed Oct 17 07:08:02 2007: Request 30054 was acted upon. > > Transaction: Ticket created by danielmcbrearty@gmail.com > > Queue: Net-SSH-Expect > > Subject: "use Net::SSH::Expect" breaks other code that uses "open" > > Broken in: (no value) > > Severity: Important > > Owner: Nobody > > Requestors: danielmcbrearty@gmail.com > > Status: new > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=30054 > > > > > > > This bug is described at perlmonks.com - see > > http://perlmonks.org/?node_id=645156 > > > > Basically, using this module (even though no code within it is called) > > can break other code that uses open and a pipe to control an external > > process. This only happens when the call to open is an external perl module. > > > > The behaviour has been confirmed by other perl monks, one of whom has > > suggested a probable cause (I haven't yet had time to check that). > > > > For a full description, please refer to the link above. > > > > > > Thanks > > > > Daniel > > > > > >
> >
-- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131
Subject: Re: [rt.cpan.org #30054] "use Net::SSH::Expect" breaks other code that uses "open"
Date: Sun, 2 Dec 2007 09:45:38 +0100
To: bug-Net-SSH-Expect [...] rt.cpan.org
From: "Daniel McBrearty" <danielmcbrearty [...] gmail.com>
Hi Bruno I'm really sorry I never got back to you on this. I wanted to try to fire up the code to test this, but it's tricky as the thing I was working on to do this is no longer needed, so I haven't been able to. I seem to remember that I did try once, but I couldn't get the bug to reproduce, which was very bizarre - as far as I know, nothing that should affect things had changed. If you are happy with the bugfix, I'd just go ahead and release it. I'm really sorry that I couldn't complete the verification for you though. Daniel On 10/17/07, Daniel McBrearty <danielmcbrearty@gmail.com> wrote: Show quoted text
> Hi Bruno > > I will do, it may take a few days though as I am working on other > things for a bit > > regards > > D > > > On 10/17/07, Bruno Negrao via RT <bug-Net-SSH-Expect@rt.cpan.org> wrote:
> > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=30054 > > > > > Hello Daniel, > > > > It looks like he found the cause, would you test that and confirm it to me? > > (i'm busy now with other things) > > > > When you confirm i'll remove that from my module and i'll republish is > > with other small changes that other people requested. > > > > Regards, > > > > bruno > > > > On 10/17/07, danielmcbrearty@gmail.com via RT > > <bug-Net-SSH-Expect@rt.cpan.org> wrote:
> > > > > > Wed Oct 17 07:08:02 2007: Request 30054 was acted upon. > > > Transaction: Ticket created by danielmcbrearty@gmail.com > > > Queue: Net-SSH-Expect > > > Subject: "use Net::SSH::Expect" breaks other code that uses "open" > > > Broken in: (no value) > > > Severity: Important > > > Owner: Nobody > > > Requestors: danielmcbrearty@gmail.com > > > Status: new > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=30054 > > > > > > > > > > This bug is described at perlmonks.com - see > > > http://perlmonks.org/?node_id=645156 > > > > > > Basically, using this module (even though no code within it is called) > > > can break other code that uses open and a pipe to control an external > > > process. This only happens when the call to open is an external perl module. > > > > > > The behaviour has been confirmed by other perl monks, one of whom has > > > suggested a probable cause (I haven't yet had time to check that). > > > > > > For a full description, please refer to the link above. > > > > > > > > > Thanks > > > > > > Daniel > > > > > > > > >
> > > >
> > > -- > Daniel McBrearty > email : danielmcbrearty at gmail.com > http://www.engoi.com > http://danmcb.vox.com > http://danmcb.blogger.com > find me on linkedin and facebook > BTW : 0873928131 >
-- Daniel McBrearty email : danielmcbrearty at gmail.com http://www.engoi.com http://danmcb.vox.com http://danmcb.blogger.com find me on linkedin and facebook BTW : 0873928131