From: Salvador F. <sfa...@ya...> - 2008-05-23 10:34:59
|
Hi, Austin Schutz <te...@of...> wrote: > The issue you claim is that data is dropped when more than 512 bytes of > data are passed to syswrite. I don't see how this can be an expect issue. At > no point are you sending that much data through a pty. Well, yes, the bug was not in Expect, but the solution was to change the way Expect is used (actually the PTY) limiting its usage to the authentication phase. It is described here: http://perlmonks.org/?node_id=688097. Maybe it could be added to the Expect FAQ as it seems a useful idiom. > If the workaround to the bug in Net-SFTP-Foreign suggested at > http://rt.cpan.org/Public/Bug/Display.html?id=35888 (again, not an expect bug) > doesn't work you could use Expect to interact with openssh's sftp program. That's not the point, I am the module author ;-) Cheers, - Salva |
From: kboragouda <app...@gm...> - 2008-05-23 10:48:17
|
Hi , I am using Expect and IO::pty modules for ssh/rsh automation . In multithreaded envirnoment IO::Pty module is not working. It fails during spawning a process. But i wanted to create process (spawn) within threads. Please let me know any alternatives/solution for this. thanks appu On Fri, May 23, 2008 at 4:04 PM, Salvador Fandino <sfa...@ya...> wrote: > Hi, > > Austin Schutz <te...@of...> wrote: > > > The issue you claim is that data is dropped when more than 512 bytes > of > > data are passed to syswrite. I don't see how this can be an expect > issue. At > > no point are you sending that much data through a pty. > > Well, yes, the bug was not in Expect, but the solution was to change the > way Expect is used (actually the PTY) limiting its usage to the > authentication phase. It is described here: > http://perlmonks.org/?node_id=688097. > > Maybe it could be added to the Expect FAQ as it seems a useful idiom. > > > > > If the workaround to the bug in Net-SFTP-Foreign suggested at > > http://rt.cpan.org/Public/Bug/Display.html?id=35888 (again, not an > expect bug) > > doesn't work you could use Expect to interact with openssh's sftp > program. > > That's not the point, I am the module author ;-) > > Cheers, > > - Salva > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |
From: Matt Z. <mzagrabe@d.umn.edu> - 2008-05-23 13:15:30
|
Note: Don't reply to someone else's previous message to ask a new question - it changes the way mail clients can organize threads. On Fri, 2008-05-23 at 16:18 +0530, kboragouda wrote: > Hi , > I am using Expect and IO::pty modules for ssh/rsh automation . In > multithreaded envirnoment IO::Pty module is not working. It fails > during spawning a process. But i wanted to create process (spawn) > within threads. Expect is thread safe, but IO::Tty is not, perhaps IO::Pty is not either. There has been chatter about this before [1]. [1] http://www.nabble.com/Trouble-with-Expect-working-with-Threads-td11541250.html > Please let me know any alternatives/solution for this. Don't use expect. Use a "native" thread safe perl module. Perhaps Net::Rsh or Net::SSH::Perl. Cheers, -- Matt Zagrabelny - mzagrabe@d.umn.edu - (218) 726 8844 University of Minnesota Duluth Information Technology Systems & Services PGP key 1024D/84E22DA2 2005-11-07 Fingerprint: 78F9 18B3 EF58 56F5 FC85 C5CA 53E7 887F 84E2 2DA2 He is not a fool who gives up what he cannot keep to gain what he cannot lose. -Jim Elliot |
From: Roland G. <rgi...@cp...> - 2008-05-23 14:13:49
|
Expect can only work with threads if the Expect objects are created in the main perl thread. Even then you might run into troubles. The reason is that Expect has to fork to spawn a process and forking and threads simply don't mix. Hope this helps, Roland kboragouda wrote: > Hi , > I am using Expect and IO::pty modules for ssh/rsh automation . In > multithreaded envirnoment IO::Pty module is not working. It fails during > spawning a process. But i wanted to create process (spawn) within threads. > > Please let me know any alternatives/solution for this. > > thanks > appu > > > > On Fri, May 23, 2008 at 4:04 PM, Salvador Fandino <sfa...@ya... > <mailto:sfa...@ya...>> wrote: > > Hi, > > Austin Schutz <te...@of... <mailto:te...@of...>> wrote: > > > The issue you claim is that data is dropped when more than > 512 bytes of > > data are passed to syswrite. I don't see how this can be an > expect issue. At > > no point are you sending that much data through a pty. > > Well, yes, the bug was not in Expect, but the solution was to change > the way Expect is used (actually the PTY) limiting its usage to the > authentication phase. It is described here: > http://perlmonks.org/?node_id=688097. > > Maybe it could be added to the Expect FAQ as it seems a useful idiom. > > > > > If the workaround to the bug in Net-SFTP-Foreign suggested at > > http://rt.cpan.org/Public/Bug/Display.html?id=35888 (again, not > an expect bug) > > doesn't work you could use Expect to interact with openssh's sftp > program. > > That's not the point, I am the module author ;-) > > Cheers, > > - Salva > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > <mailto:Exp...@li...> > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |
From: Roland G. <rgi...@cp...> - 2008-05-23 14:16:37
|
I added the solution to the Expect pod, now I only need a reason to release the new version. :-) (but given that nobody seems to read the docs anyway before asking for help, I won't give that a high priority...) Thanks, Roland Salvador Fandino wrote: > Hi, > > Austin Schutz <te...@of...> wrote: > >> The issue you claim is that data is dropped when more than 512 bytes of >> data are passed to syswrite. I don't see how this can be an expect issue. At >> no point are you sending that much data through a pty. > > Well, yes, the bug was not in Expect, but the solution was to change the way Expect is used (actually the PTY) limiting its usage to the authentication phase. It is described here: http://perlmonks.org/?node_id=688097. > > Maybe it could be added to the Expect FAQ as it seems a useful idiom. > > > >> If the workaround to the bug in Net-SFTP-Foreign suggested at >> http://rt.cpan.org/Public/Bug/Display.html?id=35888 (again, not an expect bug) >> doesn't work you could use Expect to interact with openssh's sftp program. > > That's not the point, I am the module author ;-) > > Cheers, > > - Salva > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |
From: Austin S. <te...@of...> - 2008-05-23 23:34:49
|
On Fri, May 23, 2008 at 03:34:52AM -0700, Salvador Fandino wrote: > Hi, > > Austin Schutz <te...@of...> wrote: > > > The issue you claim is that data is dropped when more than 512 bytes of > > data are passed to syswrite. I don't see how this can be an expect issue. At > > no point are you sending that much data through a pty. > > Well, yes, the bug was not in Expect, but the solution was to change the way Expect is used (actually the PTY) limiting its usage to the authentication phase. It is described here: http://perlmonks.org/?node_id=688097. > > Maybe it could be added to the Expect FAQ as it seems a useful idiom. > Accessing stdin/out independently of pty seems useful, imo. I agree w/ this as a general faq answer if it works generally. There could be cases where people need to interact with 'more' or 'less', e.g. Austin |