Re: IPC::Open3 and output

2017-07-10 Thread Chas. Owens
352:trunc(ow/((1/sar)*dar)/2)*2',fps='fps= >>> 20',setsar='1/1' -profile:a aac_he_v2 -strict -2 -y >>> /home/mike/testopen.mp4"; >>> use Text::ParseWords; >>> @args = quotewords('\s+', "'", $str); >>>

Re: IPC::Open3 and output

2017-07-10 Thread Mike Martin
; >> -profile:a aac_he_v2 -strict -2 -y /home/mike/testopen.mp4"; >> use Text::ParseWords; >> @args = quotewords('\s+', "'", $str); >> >> use IPC::Open3; >> >> local(*HIS_IN, *HIS_OUT, *ERR); >> my $cmd='ffmpeg';

Re: IPC::Open3 and output

2017-07-09 Thread Chas. Owens
gt; scale='352:trunc(ow/((1/sar)*dar)/2)*2',fps='fps= 20',setsar='1/1' > -profile:a aac_he_v2 -strict -2 -y /home/mike/testopen.mp4"; > use Text::ParseWords; > @args = quotewords('\s+', "'", $str); > > use IPC::Open3;

IPC::Open3 and output

2017-07-09 Thread Mike Martin
fps= 20',setsar='1/1' -profile:a aac_he_v2 -strict -2 -y /home/mike/testopen.mp4"; use Text::ParseWords; @args = quotewords('\s+', "'", $str); use IPC::Open3; local(*HIS_IN, *HIS_OUT, *ERR); my $cmd='ffmpeg'; my $pid=open3(undef, undef, *ERR,$cmd,

IPC::Cmd pipe array

2013-10-29 Thread shawn wilson
This is cross posted from perlmonks (http://perlmonks.org/?node_id=1060079). The end goal is to echo an array of iptables save data into iptables-restore. I am getting output via IPC::Cmd but not via the redirect (which is fine) however, the pipe also doesn't seem to be working. Any ideas? #

Re: IPC::Open3 Usage

2013-03-22 Thread Brandon McCaig
On Thu, Mar 21, 2013 at 11:12:54PM +0100, Dominik Danter wrote: > Hi I just don't understand the perlfaq example. All I want is to capture > output > of an external command's stdout and stderr. Here is what I've tried: > > sub get_exit() { Careful with those parens. You may not realize, but that

Re: IPC::Open3 Usage

2013-03-21 Thread Charles DeRykus
On Thu, Mar 21, 2013 at 6:41 PM, Charles DeRykus wrote: > On Thu, Mar 21, 2013 at 3:12 PM, Dominik Danter wrote: >> Hi I just don't understand the perlfaq example. All I want is to capture >> output >> of an external command's stdout and stderr. Here is what I've tried: >> >> >> sub get_exit() {

IPC::Open3 Usage

2013-03-21 Thread Dominik Danter
Hi I just don't understand the perlfaq example. All I want is to capture output of an external command's stdout and stderr. Here is what I've tried: sub get_exit() { my ($exit_status, $std_out, $std_err) = @_; my %error_codes = ( 1024 => 'uid already exists', 256 => 'not

Re: ipc question

2011-12-16 Thread thebarn...@gmail.com
On Dec 14, 6:42 pm, oiss...@gmail.com (Tessio Fechine) wrote: > Hello, > I have a cgi application that has a two way communication with a ldap > application via open2: > > |home.cgi|  <===>  |ldap.pl| > > I need to keep communicating with the same ldap.pl process as other cgi > scripts are launched

Re: ipc question

2011-12-15 Thread Peter Scott
On Wed, 14 Dec 2011 20:42:10 -0300, Tessio Fechine wrote: > I have a cgi application that has a two way communication with a ldap > application via open2: > > I need to keep communicating with the same ldap.pl process as other cgi > scripts are launched: Sounds like you want a named pipe. -- Pe

Re: ipc question

2011-12-14 Thread Shlomi Fish
On Wed, 14 Dec 2011 20:42:10 -0300 Tessio Fechine wrote: > Hello, > I have a cgi application that has a two way communication with a ldap > application via open2: > > |home.cgi| <===> |ldap.pl| > > > I need to keep communicating with the same ldap.pl process as other cgi > scripts are launch

ipc question

2011-12-14 Thread Tessio Fechine
Hello, I have a cgi application that has a two way communication with a ldap application via open2: |home.cgi| <===> |ldap.pl| I need to keep communicating with the same ldap.pl process as other cgi scripts are launched: |home.cgi| xxx |ldap.pl| <===> |admin.cgi| I don't know how

Re: Command 'dir' not found in C:\MinGW\bin, C:\Python27,..... when use IPC::Run

2011-07-21 Thread Shlomi Fish
the case. You shouldn't depend on "dir" from within Perl anyway because Perl has native and portable routines and modules to query the file system: http://perl-begin.org/uses/sys-admin/ Regards, Shlomi Fish > > Can anybody explain it for me. > > Thanks >

Command 'dir' not found in C:\MinGW\bin, C:\Python27,..... when use IPC::Run

2011-07-21 Thread hsin
I came across this error when I run follow code on windows. and if changed the command `dir` to `ipconfig`, it's ok. I guess it because dir is a cmd internal command but ipconfig isn't. Can anybody explain it for me. Thanks code: use strict; use IPC::Run qw(run timeout); my @cmd = q

Re: IPC::Shareable issue

2011-01-11 Thread André
hould not really use IPC::Shareable, it's last release > was ages ago. > It does not succeed tests on a 5.10.x perl: > https://rt.cpan.org/Public/Bug/Display.html?id=41401 - and I guess the > patch in this bug report will get it working for you again. > > I guess it would be worthw

Re: IPC::Shareable issue

2011-01-10 Thread Michiel Beijen
Hi, I guess you should not really use IPC::Shareable, it's last release was ages ago. It does not succeed tests on a 5.10.x perl: https://rt.cpan.org/Public/Bug/Display.html?id=41401 - and I guess the patch in this bug report will get it working for you again. I guess it would be wort

IPC::Shareable issue

2011-01-09 Thread crash82
Hello, I'm trying to lock and unlock a variable in shared memory my $cleanHandler = tie $cleanup_running, 'IPC::Shareable', 'data', { 'destroy' => 1, 'create' => 1 }; $cleanHandler->shlock(); $cleanup_running++;

Re: How to test Output when using IPC::Open3

2010-08-31 Thread C.DeRykus
useful info on the the 'use Test::Trap ...' import list, especially Shlomi's. -- Charles DeRykus use strict; use warnings; use IPC::Open3; use IO::Handle; use Test::More; use Test::Trap qw( trap $trap :flow :stderr(systemsafe) :stdout(systemsafe) :warn ); $|

Re: How to test Output when using IPC::Open3

2010-08-29 Thread marcos rebelo
We are out of contest in here. I know how to run open3, but I don't know how to test it. Repeating use strict; use warnings; use IPC::Open3; use IO::Handle; use Test::More; use Test::Trap; sub shell_run { my ($stdin, $stdout, $stderr) = map {IO::Handle->new} (0..2); pri

Re: How to test Output when using IPC::Open3

2010-08-29 Thread C.DeRykus
27;ll very likely want to use IO::Select to marshal when the read's occur and search for some sample code. > > On Sun, Aug 29, 2010 at 6:08 AM, John W. Krahn wrote: > > > > > C.DeRykus wrote: > > >> Since you mention simplifying the code, do you actually > &g

Re: How to test Output when using IPC::Open3

2010-08-28 Thread marcos rebelo
the idea is to process the STDOUT ad the STDERR. open don't do it Best Regards Marcos Rebelo On Sun, Aug 29, 2010 at 6:08 AM, John W. Krahn wrote: > C.DeRykus wrote: >> >> Since you mention simplifying the code, do you actually >> need IPC::Open3 ?  In your sample co

Re: How to test Output when using IPC::Open3

2010-08-28 Thread John W. Krahn
C.DeRykus wrote: Since you mention simplifying the code, do you actually need IPC::Open3 ? In your sample code, you're only reading process output. If you don't need IPC::Open3 complexity, you could just use magic open to read output : sub shell_run { print "";

Re: How to test Output when using IPC::Open3

2010-08-28 Thread C.DeRykus
On Aug 28, 12:45 am, ole...@gmail.com (marcos rebelo) wrote: > I'm having a more or less complicated code, that was simplified to this. > > use strict; > use warnings; > use IPC::Open3; > use IO::Handle; > use Test::More; > use Test::Trap; > > sub shell_run {

How to test Output when using IPC::Open3

2010-08-28 Thread marcos rebelo
I'm having a more or less complicated code, that was simplified to this. use strict; use warnings; use IPC::Open3; use IO::Handle; use Test::More; use Test::Trap; sub shell_run { my ($stdin, $stdout, $stderr) = map {IO::Handle->new} (0..2); print ""; ope

Re: ipc::run

2010-07-08 Thread C.DeRykus
On Jul 4, 5:59 pm, knowsuperunkn...@gmail.com (Unknown User) wrote: > Hi all, > > I have written a script that uses ipc::run on an array, like this, > based on a previous post here: > > m...@host101: cat ipc > #!/usr/bin/perl -w > use strict; > use IPC::Run qw/ru

Re: ipc::run

2010-07-08 Thread C.DeRykus
On Jul 4, 5:59 pm, knowsuperunkn...@gmail.com (Unknown User) wrote: > Hi all, > > I have written a script that uses ipc::run on an array, like this, > based on a previous post here: > > m...@host101: cat ipc > #!/usr/bin/perl -w > use strict; > use IPC::Run qw/ru

Re: ipc::run (but most probably IPC::Run)

2010-07-08 Thread Dr.Ruud
Unknown User wrote: I have written a script that uses ipc::run on an array, like this, based on a previous post here: I see no usage of "ipc::run" there, did you maybe mean "IPC::Run"? m...@host101: cat ipc #!/usr/bin/perl -w use strict; use IPC::Run qw/run/; my (@hosts

Re: ipc::run

2010-07-06 Thread Shlomi Fish
On Monday 05 Jul 2010 03:59:26 Unknown User wrote: > Hi all, > > I have written a script that uses ipc::run on an array, like this, > based on a previous post here: > > m...@host101: cat ipc > #!/usr/bin/perl -w > use strict; > use IPC::Run qw/run/; > my (@ho

ipc::run

2010-07-06 Thread Unknown User
Hi all, I have written a script that uses ipc::run on an array, like this, based on a previous post here: m...@host101: cat ipc #!/usr/bin/perl -w use strict; use IPC::Run qw/run/; my (@hosts,@cmd,$task); @hosts = qw/localhost localhost host101/; foreach my $host (@hosts) { $task = sub

Re: IPC::Open2 and mod_perl

2008-08-03 Thread Jeff Pang
Hello, Since this is most likely a modperl question, I suggest you'd better ask it to modperl list: http://lists.cpan.org/showlist.cgi?name=modperl-user Good luck! Ryan 写道: > I'm trying to do this under mod_perl2: > > use IPC::Open2; > my $pid = open2(*CHLD_OUT, *CH

IPC::Open2 and mod_perl

2008-08-03 Thread Ryan
I'm trying to do this under mod_perl2: use IPC::Open2; my $pid = open2(*CHLD_OUT, *CHLD_IN, '/usr/local/bin/prince -'); I've also tried this: use IPC::Open2; my $pid = open2(*CHLD_OUT, *CHLD_IN, '/usr/local/bin/prince', ' - ' ); It works from a normal c

Re: while(1) or redo [was: Re: IPC problem]

2007-02-07 Thread Adriano Ferreira
On 2/7/07, Rob Dixon <[EMAIL PROTECTED]> wrote: Igor Sutton wrote: > Hi fellows, > >> Dave, you wanted to use >> >> while (1) { >> ... >> the code to be repeated >> .. >> } >> > > The above code could be written like this: > > { >... ># the code to be repeated >... >redo; >

Re: while(1) or redo [was: Re: IPC problem]

2007-02-07 Thread Rob Dixon
Igor Sutton wrote: Hi fellows, Dave, you wanted to use while (1) { ... the code to be repeated .. } The above code could be written like this: { ... # the code to be repeated ... redo; } Do you think this is better or worse than the other idiom? I like the last more.

while(1) or redo [was: Re: IPC problem]

2007-02-05 Thread Igor Sutton
Hi fellows, Dave, you wanted to use while (1) { ... the code to be repeated .. } The above code could be written like this: { ... # the code to be repeated ... redo; } Do you think this is better or worse than the other idiom? I like the last more. -- Igor Sutton Lope

Re: IPC problem

2007-02-05 Thread Jenda Krynicky
From: "Tom Phoenix" <[EMAIL PROTECTED]> > On 2/2/07, Gauthier, Dave <[EMAIL PROTECTED]> wrote: > > > print WR "2"; > > What, you didn't put a newline on the end of the line? Your client is > reading lines, isn't it? > > > goto top; > > Excuse me; I feel unwell. Search the net for "goto consider

Re: IPC problem

2007-02-02 Thread Tom Phoenix
On 2/2/07, Gauthier, Dave <[EMAIL PROTECTED]> wrote: print WR "2"; What, you didn't put a newline on the end of the line? Your client is reading lines, isn't it? goto top; Excuse me; I feel unwell. Search the net for "goto considered harmful" -- or at least, consider it harmful. Cheers!

IPC problem

2007-02-02 Thread Gauthier, Dave
not a system command. The test I'm trying to implement has the parallel process simply increment an integer that's passed to it, then send that value to STDOUT. Here's the code. use IPC::Open2; $pid = open2(\*RD, \*WR, "perl det.pl") or die "Failed to spawn off th

Re: Problems installing IPC::Run on Mac OS X 10.3.5

2004-10-06 Thread Michael Glaesemann
On Oct 7, 2004, at 4:02 AM, Wiggins d Anconia wrote: [EMAIL PROTECTED] might turn up more responders, http://lists.perl.org/showlist.cgi?name=macosx Thank you. I'll try there next. It appeared from the output that a test that should fail didn't. Interesting. I hadn't noticed that before, but now th

Re: Problems installing IPC::Run on Mac OS X 10.3.5

2004-10-06 Thread Wiggins d Anconia
> > On Oct 5, 2004, at 10:31 AM, Michael Glaesemann wrote: > > > Hello! I'm having some difficulty installing IPC::Run on Mac OS X > > 10.3.5. > > As no one at [EMAIL PROTECTED] has responded to my post, perhaps this > isn't the appropriate maili

Re: Problems installing IPC::Run on Mac OS X 10.3.5

2004-10-06 Thread Michael Glaesemann
On Oct 5, 2004, at 10:31 AM, Michael Glaesemann wrote: Hello! I'm having some difficulty installing IPC::Run on Mac OS X 10.3.5. As no one at [EMAIL PROTECTED] has responded to my post, perhaps this isn't the appropriate mailing list for this question. Could someone suggest a more a

Problems installing IPC::Run on Mac OS X 10.3.5

2004-10-04 Thread Michael Glaesemann
Hello! I'm having some difficulty installing IPC::Run on Mac OS X 10.3.5. perl -v returns This is perl, v5.8.1-RC3 built for darwin-thread-multi-2level (with 1 registered patch, see perl -V for more detail) Interested parties can find perl -V output at the end of this email. I'm usin

RE: IPC with parent from mutiple children

2003-06-27 Thread Lodewijks, Jeroen
f time and it seems it always works. I hope somebody else can use this, might (s)he stumble upon multiprocessing Cheers, Jeroen > Sent: 26 June 2003 17:55 > To: '[EMAIL PROTECTED]' > Subject: IPC with parent from mutiple children > > > Hi all, > > Again, I dro

IPC with parent from mutiple children

2003-06-26 Thread Lodewijks, Jeroen
Hi all, Again, I drown in the muddy watters of child processes: What I want to achieve is: spawn up to $max_child processes and setup pipes in such away that all child processes can 'print' to the parent. This because I want to inform the parent about the exit value of the process (I know I can

Help with IPC::Run

2003-06-18 Thread Rasoul Hajikhani
Hi there, I having a hard time making IPC::Run work. Here is what I have running: push (@commands, "gpg --homedir $home --no-tty --passphrase-fd 0 --no-default-keyring --secret-keyring $home/$gpgSecret --decrypt $encryptFile"); $h = start [EMAIL PROTECTED], 'pipe', \*OUT, &#

Need help with IPC::Open2

2003-06-14 Thread Rama Buddhineni
Hi, I need help regarding this script. This subroutine is supposeded to login into a database table ($TABLE) with query ($QUERY) and return the output. This is only a part of the total subroutine. sub getEvents { my ($TABLE,$QUERY) = @_; my ($a, @T, $T, @keys, @fmt, @K, $k, $j, %event, @L

dup2 and IPC

2003-03-27 Thread Mark G
hi all, I am having a problem with duping stdout and socket. When my client forks of children, the childrens stdout is then duped with a socket. Which is what I want, but for some reason the parents stdout gets redirected as well. I want the parents STDOUT to stay the same and only redirect chi

open2 to IPC::Run

2002-09-22 Thread Robert Rendler
I've been trying to turn an open2 command into an IPC::Run command without much luck, here's my open2 command: open2 *READER, *WRITER, "$self->{_nsgmls} -E0 -s $sgmlDecl - 2>&1"; print WRITER $self->{_xhtml}; close WRITER; while () {

RE: Can IPC work?

2002-07-23 Thread Pritpal Dhaliwal
s Cc: Mayank Ahuja Subject: Re: Can IPC work? Mayank -- ...and then Mayank Ahuja said... % % Hi All, Hello! % % Please go through the following scenario: [snip] ... % % Is there a way by which Shell A can come to know of the value of the % variable set in B? % I

Re: Can IPC work?

2002-07-23 Thread drieux
; | >(execution of the script continues once B is over) > > > Is there a way by which Shell A can come to know of the value of the > variable set in B? [..] yes, but it will not be easy Bob has covered most of the normal ways. > I don't know anything about IPC...can it

RE: Can IPC work?

2002-07-23 Thread Bob Showalter
> -Original Message- > From: Mayank Ahuja [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 23, 2002 3:15 AM > To: Perl > Subject: Can IPC work? > > > Hi All, > > Please go through the following scenario: > > A perl script has been invoked from shell

Re: Can IPC work?

2002-07-23 Thread David T-G
Mayank -- ...and then Mayank Ahuja said... % % Hi All, Hello! % % Please go through the following scenario: [snip] ... % % Is there a way by which Shell A can come to know of the value of the % variable set in B? % I don't know anything about IPC...can it work in this sce

Can IPC work?

2002-07-22 Thread Mayank Ahuja
can come to know of the value of the variable set in B? I don't know anything about IPC...can it work in this scenario? Thanks in advance -- Regards Mayank -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: IPC

2002-01-18 Thread Bob Showalter
> -Original Message- > From: Ryan Guy [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 18, 2002 9:20 AM > To: '[EMAIL PROTECTED]' > Subject: IPC > > > I was wondering if anyone could point me in the direction of > a good perl ipc > tutorial (o

IPC

2002-01-18 Thread Ryan Guy
I was wondering if anyone could point me in the direction of a good perl ipc tutorial (other than perldoc). Also any perlscript sites or using c/c++ in perl would be appreciated too. Thanks in advance. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: IPC Question

2001-11-04 Thread nafiseh saberi
- Original Message - From: "Veeraraju_Mareddi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, November 04, 2001 11:58 AM Subject: IPC Question > open(WRITE, "|notepad"); > print WRITE "Raju"; > > This should open a no

IPC Question

2001-11-04 Thread Veeraraju_Mareddi
open(WRITE, "|notepad"); print WRITE "Raju"; This should open a notepad and write Raju to the notepad. But its not doing So WHY??. With Regards Raju -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

A IPC::Shareable query

2001-07-10 Thread Vidyut Chavan
that is called I need to update this variable, but the caller must have the value as well, since the widget makes a refrence to it. I thought the best solution was to use IPC::Shareable and tie the required variables. So I downloaded the module from CPAN and installed it on Sun-Solaris. All

Re: IPC::Open3

2001-06-20 Thread Michael Fowler
On Wed, Jun 20, 2001 at 11:26:32AM -0700, Paul Burkett wrote: > Basically I'm suppose to be able to change the cameras > which are displayed on the webpage. Right now I can > change the cameras displayed on the webpage by > accessing Tip and typing in a command like '@01' (any > value through @01-

Re: IPC::Open3

2001-06-20 Thread Paul Burkett
Basically I'm suppose to be able to change the cameras which are displayed on the webpage. Right now I can change the cameras displayed on the webpage by accessing Tip and typing in a command like '@01' (any value through @01-@16) also you can type in '@22' (any value through @22-@44) and it will

Re: IPC::Open3

2001-06-20 Thread Michael Fowler
On Wed, Jun 20, 2001 at 11:06:19AM -0700, Paul Burkett wrote: > He do you or anybody know of a program like TIP > (creates a terminal connection to a remote host) that > will work in Perl, right now all I get is "tip:must be > interactive", thanks. What's giving you this error message? If you're

Re: IPC::Open3

2001-06-20 Thread Paul Burkett
;, thanks. > On Wed, Jun 20, 2001 at 09:59:38AM -0700, Paul > Burkett wrote: > > As a last ditch effort to get this serial device > to > > write I found a Perl module called "IPC::Open3" it > > seems to have the ability to write to a serial > device. > &g

Re: IPC::Open3

2001-06-20 Thread Michael Fowler
On Wed, Jun 20, 2001 at 09:59:38AM -0700, Paul Burkett wrote: > As a last ditch effort to get this serial device to > write I found a Perl module called "IPC::Open3" it > seems to have the ability to write to a serial device. I'm not sure where you got this idea. IPC::

IPC::Open3

2001-06-20 Thread Paul Burkett
As a last ditch effort to get this serial device to write I found a Perl module called "IPC::Open3" it seems to have the ability to write to a serial device. Does any body have any experience with it? I read the documentation on CPAN.org's site numerous times but kept on asking my

Re: open() for IPC isn't dying ?

2001-06-19 Thread Evgeny Goldin (aka Genie)
perlipc : > If you're *writing* to a pipe, you should also trap SIGPIPE > Otherwise, think of what happens when you start up a pipe to a command > that doesn't exist: the open() will in all likelihood succeed (it only > reflects the fork()'s success) Hmm .. Although perlipc is talking about *w

Re: Re[2]: open() for IPC isn't dying ?

2001-06-19 Thread Nigel Wetters
erefore, while readers of bogus commands return just a quick end of file, writers to bogus command will trigger a signal they'd better be prepared to handle. >>> [EMAIL PROTECTED] 06/19/01 03:26pm >>> NW> The open function lets you write or read from anot

Re[2]: open() for IPC isn't dying ?

2001-06-19 Thread Evgeny Goldin (aka Genie)
NW> The open function lets you write or read from another program, but not both. NW> Use the standard IPC::Open2 or IPC::Open3 modules. But I'm only reading from it.

open() for IPC isn't dying ?

2001-06-19 Thread Evgeny Goldin (aka Genie)
Hi, I've just noticed that open() used for IPC isn't dying when forking an illegal (non-existing) process : >perl -w my $command = "a 2>&1 |"; ( my $pid = open ( FOUT, $command )) or die "Failed to open [$command] : $! \a\n"; print &q