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);
>>>
;
>> -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';
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;
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,
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?
#
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
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() {
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
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
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
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
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
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
>
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
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
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
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++;
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
);
$|
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
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
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
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 "";
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 {
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
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
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
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
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
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
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
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
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;
>
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.
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
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
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!
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
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
>
> 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
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
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
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
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
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,
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
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
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 () {
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
; |
>(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
> -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
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 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]
> -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
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
- 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
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]
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
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-
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
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
;, 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
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::
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
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
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
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.
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
67 matches
Mail list logo