Re: Re-exec in perl

2016-10-04 Thread X Dungeness
be internally implemented on your system > with "alarm". > > > It may be irrelevant on recent OS's too. An 'exec' inside a signal handler looks like the problematic issue. The following runs fine: use feature 'say'; say "starting at ",s

Re: Re-exec in perl

2016-10-04 Thread X Dungeness
ue, Oct 4, 2016 at 1:34 PM, Chas. Owens wrote: > The first alarm is in a different process (same PID different process) due > to the exec. I am not sure what is happening, but in general it is never a > good idea to do anything complex in a signal handler. > > On Tue, Oct 4, 2016 at

Re: Re-exec in perl

2016-10-04 Thread Chas. Owens
The first alarm is in a different process (same PID different process) due to the exec. I am not sure what is happening, but in general it is never a good idea to do anything complex in a signal handler. On Tue, Oct 4, 2016 at 4:21 PM Shawn H Corey wrote: > On Tue, 04 Oct 2016 19:32:44 +0

Re: Re-exec in perl

2016-10-04 Thread Shawn H Corey
On Tue, 04 Oct 2016 19:32:44 + "Chas. Owens" wrote: > It looks like the problem exists at the C level as well. This code > doesn't work past the first alarm: Doesn't it say the alarm has to be reset by the code in the documentation? After all, you don't want a second alarm to go off before

Re: Re-exec in perl

2016-10-04 Thread Chas. Owens
t, never use -w flag to enable warnings; use the warnings pragma > instead. > > Second, you should not exec the script directly, you don't know if it is > executable or not, and it could even wind up running under a different > version of perl. Instead, you should exec same the int

Re: Re-exec in perl

2016-10-04 Thread Chas. Owens
First, never use -w flag to enable warnings; use the warnings pragma instead. Second, you should not exec the script directly, you don't know if it is executable or not, and it could even wind up running under a different version of perl. Instead, you should exec same the interpreter th

Re-exec in perl

2016-10-03 Thread Unknown User
I am trying to re-exec my script after a delay. I expect that the code below would go on re-execing indefinitely, however that does not happen. It exits after one reexec. What should be done to make the code re-exec forever? $ cat exec.pl #!/usr/bin/perl -w use strict; alarm(5); $SIG{"

Re: Forked script doesnt exec from a cgi script

2009-02-08 Thread Neetee Pawa
, Nandambakkam Post, Ramapuram, Chennai-600 089. Jeff Peng 02/08/2009 06:02 PM To Neetee Pawa/GIS/c...@csc cc beginners@perl.org Subject Re: Forked script doesnt exec from a cgi script 2009/2/8 Neetee Pawa : > > I tried to try a test.pl which sleeps for 10 secs , then i can

Forked script doesnt exec from a cgi script

2009-02-08 Thread Neetee Pawa
}else{ # close(STDOUT); close(STDERR); close(STDIN); exec "/opt/soe/local/bin/perl /opt/soe/local/bin/test.pl "; # Run script in background #exec "/opt/soe/local/bin/perl /opt/soe/local/bin/pres-upd-reports --rep

Re: unix-like 'exec' in perl?

2008-08-24 Thread Jenda Krynicky
From: "Mark Henry" <[EMAIL PROTECTED]> > I want to be able to restart a script under certain conditions, and I was > thinking of how I would do this using exec in ksh. > > exec as I understand it is 'replace the current process with the specified > program

unix-like 'exec' in perl?

2008-08-24 Thread Mark Henry
Hi All, I want to be able to restart a script under certain conditions, and I was thinking of how I would do this using exec in ksh. exec as I understand it is 'replace the current process with the specified program', where in perl it seems to be 'run the specified program but d

Re: Difference between system() and exec() and ``

2008-06-18 Thread Jay Savage
> >>>> As we know there are 3 ways a system shell command to be executed. >> >>>> >> >>>> 1.> $var = system("command"); >> >>>> 2.> $var = exec("command"); >> >>>> 3.> $var = `command`; >> &

Re: Difference between system() and exec() and ``

2008-06-18 Thread Chas. Owens
On Wed, Jun 18, 2008 at 16:41, Chas. Owens <[EMAIL PROTECTED]> wrote: > On Wed, Jun 18, 2008 at 16:18, <[EMAIL PROTECTED]> wrote: > snip >> A signature line on an email said in effect that the best skill a >> programmer >> can have is to be able to read. I differ. I think that the best skill a >>

Re: Difference between system() and exec() and ``

2008-06-18 Thread Chas. Owens
On Wed, Jun 18, 2008 at 16:18, <[EMAIL PROTECTED]> wrote: snip > A signature line on an email said in effect that the best skill a > programmer > can have is to be able to read. I differ. I think that the best skill a > programmer > can have is the ability to LISTEN. More bad programs and bad proj

Re: Difference between system() and exec() and ``

2008-06-18 Thread Jay Savage
to be executed. >>>>> >>>>> 1.> $var = system("command"); >>>>> 2.> $var = exec("command"); >>>>> 3.> $var = `command`; >>>>> >>>>> What is difference between these three? >>

Re: Difference between system() and exec() and ``

2008-06-18 Thread Jenda Krynicky
Rob Dixon wrote: > Gunnar Hjalmarsson wrote: > > Rob Dixon wrote: > >> Gunnar Hjalmarsson wrote: > >>> swaroop wrote: > >>>> > >>>> As we know there are 3 ways a system shell command to be executed. > >>>> > >>

RE: Difference between system() and exec() and ``

2008-06-18 Thread Richard.Copits
ject: Re: Difference between system() and exec() and `` Rob Dixon wrote: > It is entirely possible that the OP had no knowledge of the built in > documentation, True. But you can't seriously mean that we should accept that as a persistent state instead of calling his attention to it??

Re: Difference between system() and exec() and ``

2008-06-18 Thread Gunnar Hjalmarsson
Rob Dixon wrote: It is entirely possible that the OP had no knowledge of the built in documentation, True. But you can't seriously mean that we should accept that as a persistent state instead of calling his attention to it?? or even that he had already read it, failed to understand it Ye

Re: Difference between system() and exec() and ``

2008-06-18 Thread Dr.Ruud
Rob Dixon schreef: > I think you should talk to the other abusive people who like to > post here and form a separate group. LOL Stop trying to find your way in like this! ;) -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mai

Re: Difference between system() and exec() and ``

2008-06-18 Thread Rob Dixon
Gunnar Hjalmarsson wrote: > Rob Dixon wrote: >> Gunnar Hjalmarsson wrote: >>> swaroop wrote: >>>> >>>> As we know there are 3 ways a system shell command to be executed. >>>> >>>> 1.> $var = system("command"); >>&

Re: Difference between system() and exec() and ``

2008-06-17 Thread Gunnar Hjalmarsson
Rob Dixon wrote: Gunnar Hjalmarsson wrote: swaroop wrote: As we know there are 3 ways a system shell command to be executed. 1.> $var = system("command"); 2.> $var = exec("command"); 3.> $var = `command`; What is difference between these three? You should not

Re: Difference between system() and exec() and ``

2008-06-17 Thread Rob Dixon
Gunnar Hjalmarsson wrote: > swaroop wrote: >> As we know there are 3 ways a system shell command to be executed. >> >> 1.> $var = system("command"); >> 2.> $var = exec("command"); >> 3.> $var = `command`; >> >> What is di

Re: Difference between system() and exec() and ``

2008-06-17 Thread Gunnar Hjalmarsson
swaroop wrote: As we know there are 3 ways a system shell command to be executed. 1.> $var = system("command"); 2.> $var = exec("command"); 3.> $var = `command`; What is difference between these three? You should not have asked that question here; you should have

Re: Difference between system() and exec() and ``

2008-06-17 Thread Chas. Owens
On Tue, Jun 17, 2008 at 01:47, swaroop <[EMAIL PROTECTED]> wrote: > As we know there are 3 ways a system shell command to be executed. > > 1.> $var = system("command"); > 2.> $var = exec("command"); > 3.> $var = `command`; > > What is dif

Re: Difference between system() and exec() and ``

2008-06-17 Thread Jeff Peng
On Tue, Jun 17, 2008 at 1:47 PM, swaroop <[EMAIL PROTECTED]> wrote: > As we know there are 3 ways a system shell command to be executed. > > 1.> $var = system("command"); > 2.> $var = exec("command"); > 3.> $var = `command`; > > What is dif

Difference between system() and exec() and ``

2008-06-17 Thread swaroop
As we know there are 3 ways a system shell command to be executed. 1.> $var = system("command"); 2.> $var = exec("command"); 3.> $var = `command`; What is difference between these three? I found that the first two options are printing the output of the command. An

Re: Why am I getting the error (Maybe you meant system() when you said exec()?) ??

2007-06-16 Thread jreljac
Thanks all...that was a huge help. Once I changed to system() everything started to work as I wanted it to. Thanks again, Jason -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Why am I getting the error (Maybe you meant system() when you said exec()?) ??

2007-06-15 Thread Paul Lalli
$isdst) = localtime > time; > exec ("mysqldump --user=*** --password=*** $ARGV[$argnum] > /backups/ > $ARGV[$argnum]--$mon-$mday-$year-$hour-$min-$sec.sql"); > exec ("tar czpf $ARGV[$argnum]--$mon-$mday-$year-$hour-$min-$sec.sql > $ARGV[$argnum]--$mon-$mday-

Re: Why am I getting the error (Maybe you meant system() when you said exec()?) ??

2007-06-15 Thread Chas Owens
On 6/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Howdy, Please be gentle, I'm a perl novice to say the least. snip When I run it (./scripts/bk.pl dbname) it runs the first exec properly, but it dose not do the second. I get the error (Maybe you meant system() when yo

Re: Why am I getting the error (Maybe you meant system() when you said exec()?) ??

2007-06-15 Thread Martin Barth
Hi, you ment system() wen you said exec()! perldoc -f system perldoc -f exec for short: exec() replaces the perl process. system() invokes your myslqdump process and waits till it is finished. HTH Martin On Fri, 15 Jun 2007 15:17:03 - [EMAIL PROTECTED] wrote: > Howdy, > >

Why am I getting the error (Maybe you meant system() when you said exec()?) ??

2007-06-15 Thread jreljac
Howdy, Please be gentle, I'm a perl novice to say the least. I have the following script (called bk.pl right now) : foreach $argnum (0 .. $#ARGV) { my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime time; exec ("mysqldump --user=*** --password=*** $AR

Re: exec and pipe

2007-01-22 Thread Jenda Krynicky
From: Andreas Brillisauer - Hetzner Online AG <[EMAIL PROTECTED]> > Hello, > > I'm just writing a script that gets an email from stdin. This mail > should be passed to procmail via ssh. If calling ssh or procmail > fails, the mail should be saved locally. > > First I tried to s

Re: exec and pipe

2007-01-19 Thread Igor Sutton
--- #!/usr/bin/perl my $lb = $/; $/ = undef; my $mail = ; $/ = $lb; my $pid; pipe(READ, WRITE); $pid = fork(); if ($pid == 0) { close(WRITE); exec('cat'); exit(1); } elsif ($pid > 0) { close(READ); my $old_handle = select(WRITE); $| = 1; pr

exec and pipe

2007-01-19 Thread Andreas Brillisauer - Hetzner Online AG
Here is my current version of the script. For debugging reasons I call "cat" instead of "ssh". But I get no output. ---8<- #!/usr/bin/perl my $lb = $/; $/ = undef; my $mail = ; $/ = $lb; my $pid; pipe(READ

RE: FW: Exec a script on one server that will exec other scripts on a different server..

2006-06-21 Thread Jerry DuVal
[EMAIL PROTECTED] >Sent: Friday, June 09, 2006 3:27 AM >To: Jeff Pinyan >Cc: beginners@perl.org >Subject: RE: FW: Exec a script on one server that will exec other scripts >on a different server.. > > >I >Yes, I'd like to have a program that keeps a connection open suc

Re: Exec a script on one server that will exec other scripts on a different serv

2006-06-17 Thread James Turnbull
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Alan Reinhold wrote: > It would seem to be that the best solution here would be to have a > server script that creates a tcp/ip socket and sites on a read on the > socket, in which then the client connects to the server, sends a msg, > and based o

RE: Exec a script on one server that will exec other scripts on a different serv

2006-06-16 Thread Alan Reinhold
en (W)" <[EMAIL PROTECTED]> To: "Jerry DuVal" <[EMAIL PROTECTED]>, Subject: RE: Exec a script on one server that will exec other scripts on a different server.. Date: Thu, 8 Jun 2006 15:31:12 +0200 Adding it would be an advantage, however right now I just need setup a cli

RE: FW: Exec a script on one server that will exec other scripts on a different server..

2006-06-09 Thread William Paulsen \(W\)
I Yes, I'd like to have a program that keeps a connection open such that the client can tell the server to exec one of the three programs. This should be without consideration of a password or loginid. I've used NET::Telnet but because of the password changes the applications fail. F

Re: Exec a script on one server that will exec other scripts on a different server..

2006-06-08 Thread Chad Perrin
On Thu, Jun 08, 2006 at 02:54:06PM +0200, William Paulsen (W) wrote: > > I'm trying to write a perl script that will run on one server but can > instruct either socker server deamon on another server to exec any one > of three applications on a different box. The reaso

FW: Exec a script on one server that will exec other scripts on a different server..

2006-06-08 Thread William Paulsen \(W\)
From: William Paulsen (W) Sent: Thu 2006-06-08 14:54 To: beginners@perl.org Subject: Exec a script on one server that will exec other scripts on a different server.. Hi, I'm trying to write a perl script that will run on one server but can instruct e

RE: Exec a script on one server that will exec other scripts on a different server..

2006-06-08 Thread Jerry DuVal
>Adding it would be an advantage, however right now I just need setup a >client side script that'll tell the server side to exec/run one of >three scripts on the other server. We have a similar situation. One thing we did on the boxes we could not add the key pairs was add a c

RE: Exec a script on one server that will exec other scripts on a different server..

2006-06-08 Thread William Paulsen \(W\)
Adding it would be an advantage, however right now I just need setup a client side script that'll tell the server side to exec/run one of three scripts on the other server. tks William Gugulethu -Original Message- From: Jerry DuVal [mailto:[EMAIL PROTECTED] Sent: 08 June 2006 03:

RE: Exec a script on one server that will exec other scripts on a different server..

2006-06-08 Thread Jerry DuVal
>-Original Message- >From: William Paulsen (W) [mailto:[EMAIL PROTECTED] >Sent: Thursday, June 08, 2006 8:54 AM >To: beginners@perl.org >Subject: Exec a script on one server that will exec other scripts on a >different server.. > > >Hi, > >I'm tryin

Exec a script on one server that will exec other scripts on a different server..

2006-06-08 Thread William Paulsen \(W\)
Hi, I'm trying to write a perl script that will run on one server but can instruct either socker server deamon on another server to exec any one of three applications on a different box. The reason for this is the password changes every month and the scripts that I'm currently u

Re: survive with exec

2006-02-27 Thread a b
te the program. > > > > -Original Message- > From: a b [mailto:[EMAIL PROTECTED] > Sent: Monday, February 27, 2006 5:01 AM > To: beginners@perl.org > Subject: survive with exec > > Hello , > > i want to execute some batch/perl file from my perl program and co

RE: survive with exec

2006-02-27 Thread Timothy Johnson
code, because it will only indicate whether or not the shell was able to execute the program. -Original Message- From: a b [mailto:[EMAIL PROTECTED] Sent: Monday, February 27, 2006 5:01 AM To: beginners@perl.org Subject: survive with exec Hello , i want to execute some batch/perl file fr

Re: survive with exec

2006-02-27 Thread Jeff Pang
>exec ("wperl hang.pl >a.txt"); >exec ("wperl hang.pl >b.txt"); >exec ("wperl hang.pl >c.txt"); and,I'm a little strange here. if your first 'exec' is executed successfully,the main script process should be replaced with the e

Re: survive with exec

2006-02-27 Thread Jeff Pang
>exec ("wperl hang.pl >a.txt"); >exec ("wperl hang.pl >b.txt"); >exec ("wperl hang.pl >c.txt"); > hi, here I think you could fork the childs,and call the 'exec' in childs,it should be good for your purpose. for example, fo

Re: survive with exec

2006-02-27 Thread Bob Showalter
a b wrote: Here i want to execute one and then execute another but don't wait for previous command i.e.something in background but im unable to do it. see: perldoc -q 'How do I start a process in the background?' -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

survive with exec

2006-02-27 Thread a b
Hello , i want to execute some batch/perl file from my perl program and continue to do some changes and then re-execute some files. my code is like st.pl - exec ("wperl hang.pl >a.txt"); exec ("wperl hang.pl >b.txt"); exec ("wperl hang.pl >c.txt&quo

Re: fork/exec/pipe

2004-09-29 Thread Wiggins d Anconia
> Hi > > I am trying to control to start an octave process where I can write > to it read the output back into perl. > > For example I would like to : > > 1 - Start octave > 2 - Write a=1 b=2. Read output into perl > 3 - Write a+b. Read output into perl and so on. > > Could someone please help

fork/exec/pipe

2004-09-29 Thread Zafer Leylek
Hi I am trying to control to start an octave process where I can write to it read the output back into perl. For example I would like to : 1 - Start octave 2 - Write a=1 b=2. Read output into perl 3 - Write a+b. Read output into perl and so on. Could someone please help me do this. Thanks --

RE: failure with: system("dir /b"); exec("dir /b"); `dir /b`

2004-09-17 Thread A B C
ng ActiveState v5.8.4 on Windows XP Home03. > > > > > Here is the entire script... > > print `dir /s`; > > print "\n-\n"; > > system('dir /b'); > > print "\n-\n"; > > exec("dir /w"); > > print "

RE: failure with: system("dir /b"); exec("dir /b"); `dir /b`

2004-09-17 Thread Bakken, Luke
> I'm using ActiveState v5.8.4 on Windows XP Home03. > > Here is the entire script... > print `dir /s`; > print "\n-\n"; > system('dir /b'); > print "\n-\n"; > exec("dir /w"); > print "\n-\n"; Since d

RE: failure with: system("dir /b"); exec("dir /b"); `dir /b`

2004-09-17 Thread A B C
Hi, I'm using ActiveState v5.8.4 on Windows XP Home03. Here is the entire script... print `dir /s`; print "\n-\n"; system('dir /b'); print "\n-\n"; exec("dir /w"); print "\n-\n"; === Here is the result after e

RE: failure with: system("dir /b"); exec("dir /b"); `dir /b`

2004-09-17 Thread Bob Showalter
A B C wrote: > Greetings, > > Does anyone know how to get perl to run windows > commands like "dir /b". Specifically, perl doesn't > accept any type of argument switches. I've tried > system(), exec() and backticks in my script. > > However, If I r

failure with: system("dir /b"); exec("dir /b"); `dir /b`

2004-09-16 Thread A B C
Greetings, Does anyone know how to get perl to run windows commands like "dir /b". Specifically, perl doesn't accept any type of argument switches. I've tried system(), exec() and backticks in my script. However, If I remove the switch, for example: system("dir"

Re: What is this doing: eval 'exec /usr/bin/perl -T -w -S $0 ${1+"$@"}' if 0;

2004-08-09 Thread JupiterHost.Net
Jose Alves de Castro wrote: On Sun, 2004-08-08 at 04:06, JupiterHost.Net wrote: I found this code in a script right after the she-bang line: eval 'exec /usr/bin/perl -T -w -S $0 ${1+"$@"}' if 0; # not running under some shell What is it doing? Hi. From `perldoc perlrun`, u

Re: What is this doing: eval 'exec /usr/bin/perl -T -w -S $0 ${1+"$@"}' if 0;

2004-08-09 Thread Jose Alves de Castro
On Sun, 2004-08-08 at 04:06, JupiterHost.Net wrote: > I found this code in a script right after the she-bang line: > > eval 'exec /usr/bin/perl -T -w -S $0 ${1+"$@"}' > if 0; # not running under some shell > > What is it doing? Hi. From `perldoc p

What is this doing: eval 'exec /usr/bin/perl -T -w -S $0 ${1+"$@"}' if 0;

2004-08-07 Thread JupiterHost.Net
I found this code in a script right after the she-bang line: eval 'exec /usr/bin/perl -T -w -S $0 ${1+"$@"}' if 0; # not running under some shell What is it doing? Its like its executing itself again, but why? What the heck is: ${1+"$@"} ?? Wouldn't the eval

RE: working directory with exec command

2004-05-18 Thread Peterson, Darren - Contractor.Westar
x27;[EMAIL PROTECTED]' Subject: RE: working directory with exec command Peterson, Darren - Contractor.Westar wrote: > I'm trying to use fork and exec to kick-start other processes on a > Linux box. As with Win32::Process::Create, I'd like to somehow > specify or point t

RE: working directory with exec command

2004-05-18 Thread Bob Showalter
Peterson, Darren - Contractor.Westar wrote: > I'm trying to use fork and exec to kick-start other processes on a > Linux box. As with Win32::Process::Create, I'd like to somehow > specify or point towards a working directory for the new process > since some data files are

working directory with exec command

2004-05-18 Thread Peterson, Darren - Contractor.Westar
I'm trying to use fork and exec to kick-start other processes on a Linux box. As with Win32::Process::Create, I'd like to somehow specify or point towards a working directory for the new process since some data files are expected via relative path. I actually tried passing a compou

RE: Getting return code from process launched from exec

2004-04-14 Thread Jason Normandin
D'oh ! Not sure how I missed that. Thanks! That did the trick. -Jason -Original Message- From: Steve Grazzini [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 14, 2004 12:57 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Getting return code from process launched from

Re: Getting return code from process launched from exec

2004-04-14 Thread Steve Grazzini
[EMAIL PROTECTED] wrote: defined (my $pid = fork) or die "Cannot fork process : $!"; unless ($pid){ exec "$Command"; die "Cannot exec : $Command : $!"; waitpid($pid,0); } The waitpid() is unreachable there. Try putting it outside the unless()

Getting return code from process launched from exec

2004-04-14 Thread jason_normandin
Hi All I need to obtain the return code of a process forked via exec. $? appears to always return 0 even though I know that the actual process had a non-zero return code. Is $? populated to 0 as the exec was sucessfull ? If so, how can I get the return code of the process within the exec call

RE: exec() confirmation

2003-06-30 Thread Dan Muey
; > happens to the external program keep running my perl script. > > > > If I understand it right I need exec() for that. > > Yes, but you need to fork() first. exec() replaces your > current program with a new one, so you need to create a new > process with fork(), then

RE: exec() confirmation

2003-06-30 Thread Dan Muey
> > So If I do this : > > > > for(@cmds) { exec($_); } > > > > It will execute $_ and keep cruising regardless of if $_ worked, > > failed, wasn't found, etc.. > > > > Correct? > > Nope :) exec() will replace your running perl interpre

Re: exec() confirmation

2003-06-30 Thread Bernhard van Staveren
> So If I do this : > > for(@cmds) { exec($_); } > > It will execute $_ and keep cruising regardless of if $_ worked, failed, > wasn't found, etc.. > > Correct? Nope :) exec() will replace your running perl interpreter with the program you're running, so

RE: exec() confirmation

2003-06-30 Thread Bob Showalter
y perl script. > > If I understand it right I need exec() for that. Yes, but you need to fork() first. exec() replaces your current program with a new one, so you need to create a new process with fork(), then exec() the program. > > So If I do this : > > for(@cmds) { ex

exec() confirmation

2003-06-30 Thread Dan Muey
Howdy list what a beautifull Monday eh? I have shell commands I need run from a list that Perl creates based on a database. What I want to do is execute each command and regardless of what happens to the external program keep running my perl script. If I understand it right I need exec() for

RE: Have script exec itself (was: Flush Everything)

2003-06-06 Thread Bob Showalter
Charles K. Clarkson wrote: > Bob Showalter <[EMAIL PROTECTED]>wrote: > > > Voodoo Raja wrote: > > > > > > there are more then enough to init manually. > > > > > > Is there any command I can use to kill any constants > > > as

Have script exec itself (was: Flush Everything)

2003-06-06 Thread Charles K. Clarkson
Bob Showalter <[EMAIL PROTECTED]>wrote: : Voodoo Raja wrote: : > : > there are more then enough to init manually. : > : > Is there any command I can use to kill any constants : > assigned. : : One trick is to have your script exec() itself. What would this do?

RE: exec in loop

2003-02-10 Thread wiggins
On Mon, 10 Feb 2003 14:48:34 -0600, "Aman Raheja" <[EMAIL PROTECTED]> wrote: > Hi friends > I am doing exec in a foreach loop, resizing images. > But as the the exec is kicked off, it never returns > What's

RE: exec in loop

2003-02-10 Thread Dan Muey
I think exec effectively exits your perl script, you might try system, do, backticks or Use the imagemagic module to do all of this for you. perldoc -f exec perldoc -f system Dan > > > Hi friends > I am doing exec in a foreach loop, resizing images. > But as the the exec is

RE: exec in loop

2003-02-10 Thread Bob Showalter
Aman Raheja wrote: > Hi friends > I am doing exec in a foreach loop, resizing images. > But as the the exec is kicked off, it never returns What's the > way out? Here's the snippet > --- > foreach(@$

exec in loop

2003-02-10 Thread Aman Raheja
Hi friends I am doing exec in a foreach loop, resizing images. But as the the exec is kicked off, it never returns What's the way out? Here's the snippet --- foreach(@$ref){ $imgFile = @$_->[1].jpg;

Re[2]: System/Exec/Fork ... Help!

2002-11-19 Thread Evgeny Chuykov
Hallo. Jason [Tuesday, November 19, 2002, 10:11:45 PM]: JF> But, if I go the way of the fork, the program cannot be broken down into JF> lots of mini-programs which are designed to do a single job.. everything JF> would have to be rolled into one larger program with (I'm guessing here) JF> multipl

Re: System/Exec/Fork ... Help!

2002-11-19 Thread Jason Frisvold
e missing a fundamental > point: fork() and exec() are used *together* to run the external > program. > > # > # 1. create a new process with fork() > # > > defined (my $pid = fork) > or die "couldn't fork: $!"; > > # > # 2. r

Re: System/Exec/Fork ... Help!

2002-11-19 Thread Steve Grazzini
s, but it won't allow me to spawn the seperate processes that > need to run. > > System spawns the process but blocks and waits for a return? > Great, but I need to spawn, get the pid, and monitor on my own > and not via a system call... > > Exec spawns and runs this n

Re: System/Exec/Fork ... Help!

2002-11-19 Thread Jason Frisvold
I believe I have an answer to this now ... In talking with a local perl programmer, he mentioned the Daemon modules on CPAN. I did some research and it looks like I can use the Proc::Daemon module to do exactly what I want. Basically, it forks itself immediately and "detaches" itself from the

Re: System/Exec/Fork ... Help!

2002-11-19 Thread Jason Frisvold
But, if I go the way of the fork, the program cannot be broken down into lots of mini-programs which are designed to do a single job.. everything would have to be rolled into one larger program with (I'm guessing here) multiple fork points to handle each different type of system I'm trying to run .

Re: System/Exec/Fork ... Help!

2002-11-18 Thread Alan Cameron
On 18 Nov 2002 15:21:26 -0500, Jason Frisvold <[EMAIL PROTECTED]> wrote: [snip] > I can't see to figure out how to spawn a new process, return the pid, > and be able to monitor this new process on my own ... The general form would be something like: my $pid = fork(); if ($pid) { # I am

System/Exec/Fork ... Help!

2002-11-18 Thread Jason Frisvold
rocess but blocks and waits for a return? Great, but I need to spawn, get the pid, and monitor on my own and not via a system call... Exec spawns and runs this new program, forgetting the old one... In essence, the old one ceases to run ... (I think ... feel free to correct me) I can't see to

Re: exec()

2002-09-19 Thread Tim Musson
Hey Willem, My MUA believes you used to write the following on Thursday, September 19, 2002 at 8:27:52 AM. WP> Can anyone give me an example of how to use the exec() command in WP> a perl file? perldoc -f exec The above gets you documentation on the exec function... --

RE: exec()

2002-09-19 Thread NYIMI Jose (BMB)
Type the command line: perldoc -f exec José. > -Original Message- > From: Willem Pretorius [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 19, 2002 2:28 PM > To: [EMAIL PROTECTED] > Subject: exec() > > > Hi all > Can anyone give me an exa

exec()

2002-09-19 Thread Willem Pretorius
Hi all Can anyone give me an example of how to use the exec() command in a perl file? -- Willem Pretorius Northweb TEL: 014 743 1995 FAX: 014 743 3793 CELL: 072 202 4886 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

exec - proper use.

2002-07-26 Thread Maureen E Fischer
Hello, I have used an exec to get into a program. I wanted to leave one program (never to return) and start a second. This worked. Now I want to leave the second and go to yet a third program -- not to return to the second. The exec is not working this time -- so I was thinking that I am

Re: exec statement

2002-07-18 Thread Roger Morris
At 08:28 AM 7/18/2002 -0700, Maureen E Fischer wrote: >Thank you Bob, > This works for me. One further question. I thought I read somewhere >that you should >not put full paths in a CGI program for security reasons. Should that be a >consideration? >Maureen For security, you should put ful

Re: exec statement

2002-07-18 Thread Maureen E Fischer
cher [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, July 17, 2002 2:37 PM > > To: [EMAIL PROTECTED] > > Subject: exec statement > > > > > > Hello, > > I am trying to go to a script from within a script. This is > > a Perl CGI > > script and

RE: exec statement

2002-07-17 Thread Bob Showalter
> -Original Message- > From: Maureen E Fischer [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 17, 2002 2:37 PM > To: [EMAIL PROTECTED] > Subject: exec statement > > > Hello, > I am trying to go to a script from within a script. This is > a Perl CGI &

exec statement

2002-07-17 Thread Maureen E Fischer
Hello, I am trying to go to a script from within a script. This is a Perl CGI script and I want to transfer to various other perl cgi scripts based on user selections. From what I read I want to use exec for this -- since I want to leave and not return to the transferring script. The

Re: perl one-liner for find->exec->rm - SOLVED

2002-05-28 Thread Sudarsan Raghavan
; if (-f)}, ".")' > > > and it worked. > > Gary > > On Tuesday 28 May 2002 9:51 am, Gary Stainburn wrote: > > On Tuesday 28 May 2002 9:42 am, Gary Stainburn wrote: > > > Hi all, > > > > > > Can anyone give me the

Re: perl one-liner for find->exec->rm - SOLVED

2002-05-28 Thread Gary Stainburn
n anyone give me the one-liner to replace > > > > > > find . -type f -exec rm {} \; > > > > with > > > > find . -type f |perl -? > > > > to improve the speed when deleting a large squid cache > > sorry, I forgot to include how far I'v

Re: perl one-liner for find->exec->rm

2002-05-28 Thread Gary Stainburn
On Tuesday 28 May 2002 10:00 am, Felix Geerinckx wrote: > on Tue, 28 May 2002 08:42:03 GMT, [EMAIL PROTECTED] (Gary > > Stainburn) wrote: > > Hi all, > > > > Can anyone give me the one-liner to replace > > > > > > find . -type f -exec rm {}

Re: perl one-liner for find->exec->rm

2002-05-28 Thread Felix Geerinckx
on Tue, 28 May 2002 08:42:03 GMT, [EMAIL PROTECTED] (Gary Stainburn) wrote: > Hi all, > > Can anyone give me the one-liner to replace > > > find . -type f -exec rm {} \; > > with > > find . -type f |perl -? > > to improve the spe

Re: perl one-liner for find->exec->rm

2002-05-28 Thread Gary Stainburn
On Tuesday 28 May 2002 9:42 am, Gary Stainburn wrote: > Hi all, > > Can anyone give me the one-liner to replace > > > find . -type f -exec rm {} \; > > with > > find . -type f |perl -? > > to improve the speed when deleting a large squid cache sorry,

perl one-liner for find->exec->rm

2002-05-28 Thread Gary Stainburn
Hi all, Can anyone give me the one-liner to replace find . -type f -exec rm {} \; with find . -type f |perl -? to improve the speed when deleting a large squid cache -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by

RE: #exec / perl ?

2002-04-29 Thread Anders Holm
353 8437 Tel Worldwide: +1 801 736 0806 E-mail: [EMAIL PROTECTED] Internet: http://support.cp.net -Original Message- From: CMS [mailto:[EMAIL PROTECTED]] Sent: 28 April 2002 03:13 To: beginners perl Subject: #exec / perl ? Here one, I have the on our web page, this error

#exec / perl ?

2002-04-27 Thread CMS
Here one, I have the on our web page, this error is display were the tag is: [an error occurred while processing this directive] on the website, and this is the error in the log file; [Sat Apr 27 20:37:18 2002] httpd: exec used but not allowed in /usr/local/etc/httpd/WebSites

  1   2   >