Re: Re-exec in perl

2016-10-04 Thread X Dungeness
On Tue, Oct 4, 2016 at 2:07 PM, X Dungeness wrote: > Here's a possibly relevant note in the docs for both "alarm" and > "sleep": > > It is usually a mistake to intermix "alarm" and "sleep" calls, > because "sleep" may be internally implemented on your system > with "alarm". > > > It

Re: Re-exec in perl

2016-10-04 Thread X Dungeness
Here's a possibly relevant note in the docs for both "alarm" and "sleep": It is usually a mistake to intermix "alarm" and "sleep" calls, because "sleep" may be internally implemented on your system with "alarm". On Tue, Oct 4, 2016 at 1:34 PM, Chas. Owens wrote: > The first alarm

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 + >

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
int "should not get here\n"; > > What are you trying to solve with this code? Is this just academic > playing around? If not, there may be a much better solution than > re-execing the script. > > > On Tue, Oct 4, 2016 at 12:13 AM Unknown User > wrote: > >

Re: Re-exec in perl

2016-10-04 Thread Chas. Owens
an re-execing the script. On Tue, Oct 4, 2016 at 12:13 AM Unknown User wrote: 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-e

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: 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
Hi Andreas, 2007/1/19, 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 solve this wi

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: 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 reason for this is the > password

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 9:31 AM >To: Jerry DuVal; beginners@perl.org >Subject: RE: Exec a script on one server that will exec other scripts on a >different server.. > > >Adding it would be an

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

2006-06-08 Thread William Paulsen \(W\)
09 PM To: William Paulsen (W); beginners@perl.org Subject: RE: Exec a script on one server that will exec other scripts on a different server.. >-Original Message- >From: William Paulsen (W) [mailto:[EMAIL PROTECTED] >Sent: Thursday, June 08, 2006 8:54 AM >To: beginners@perl.o

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 trying to write a perl script that will run o

RE: exec() confirmation

2003-06-30 Thread Dan Muey
> Dan Muey wrote: > > 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 per

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 interpreter > with the program > you're running, so that wouldn't h

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 that wouldn't have the effect you wanted

RE: exec() confirmation

2003-06-30 Thread Bob Showalter
Dan Muey wrote: > 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 und

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 the way out? > Here's the snippet >

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 kicked off, it nev

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(@$ref){ > > $imgFile = @

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... -- [EMAIL PROTE

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 example of how to use the exec() > com

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
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 Bob Showalter wrote: > > -Original Message- > > From: Maureen E Fischer [mailto:[EM

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 > script and I want to transfer t

RE: #exec / perl ?

2002-04-29 Thread Anders Holm
Looks to me like your not allowed to execute cgi scripts in that directory. Have you checked your web servers configuration for this? Best Regards Anders Holm Critical Path Technical Support Engineer -- Tel USA/Canada: 1 800 353

RE: Exec cgi

2001-07-31 Thread Tiago Almeida Spritzer
Is this corret: From: Tiago Almeida Spritzer [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 31, 2001 10:44 AM > To: [EMAIL PROTECTED] > Subject: Exec cgi > > > Hi, > > Anybody help me with this question? > I have two folders at the server, one with perl files > and other with html f

RE: Exec cgi

2001-07-31 Thread Bob Showalter
> -Original Message- > From: Tiago Almeida Spritzer [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 31, 2001 10:44 AM > To: [EMAIL PROTECTED] > Subject: Exec cgi > > > Hi, > > Anybody help me with this question? > I have two folders at the server, one with perl files > and

RE: Exec cgi

2001-07-31 Thread Bob Showalter
> -Original Message- > From: Tiago Almeida Spritzer [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 31, 2001 10:44 AM > To: [EMAIL PROTECTED] > Subject: Exec cgi > > > Hi, > > Anybody help me with this question? > I have two folders at the server, one with perl files > and

Re: exec()

2001-06-21 Thread Paul
--- "Yacketta, Ronald" <[EMAIL PROTECTED]> wrote: > I am running the following (Thanxs to Paul for his skeleton code) > exec ( 'egrep'. "-c", $lookFor, @{$LOGS[($_ -1)]} ) You're quite welcome, but why exec egrep? Ah, I may have misled you with that code. You probably don't need the exec at all

RE: exec()

2001-06-20 Thread Peter Scott
At 04:33 PM 6/20/01 -0400, Yacketta, Ronald wrote: >exec "egrep -c $lookFor @{$LOGS[$_ - 1]} >out" unless $pid=fork; # fork new >process for cmd > > >results in: > >sh: Fault: not found >egrep: can't open App >egrep: can't open Finished >sh: Bind: not found >sh: SystemError: not found Oh great, y

Re: exec()

2001-06-20 Thread Michael Fowler
On Wed, Jun 20, 2001 at 04:21:07PM -0400, Yacketta, Ronald wrote: > I have tried that, but exec fails... > exec ( 'egrep', "-c" , $lookFor , @{$LOGS[($_ -1)]} ) unless $pid=fork; # > fork new process for cmd > > is my current line.. I have tried several different ways to add the > out > and no go

RE: exec()

2001-06-20 Thread Yacketta, Ronald
> exec "egrep -c $lookFor @{$LOGS[$_ - 1]} >out" ... > > Unless you need to protect against malicious entries in > @LOGS, this'll get > you going. okay, a bit more info... $lookFor="Test App Finished|Fault 2-0|ORA-|Bind|SystemError|SystemException|Communication|ORBA|Get Q Error"; foreach (@al

RE: exec()

2001-06-20 Thread Peter Scott
At 04:21 PM 6/20/01 -0400, Yacketta, Ronald wrote: > > Well, exec simply replaces your perl script with whatever you > > give it, > > so if you want redirection, just use '>' > > > >I have tried that, but exec fails... >exec ( 'egrep', "-c" , $lookFor , @{$LOGS[($_ -1)]} ) unless $pid=fork; # >fo

RE: exec()

2001-06-20 Thread Yacketta, Ronald
> Well, exec simply replaces your perl script with whatever you > give it, > so if you want redirection, just use '>' > I have tried that, but exec fails... exec ( 'egrep', "-c" , $lookFor , @{$LOGS[($_ -1)]} ) unless $pid=fork; # fork new process for cmd is my current line.. I have tried se

Re: exec() - amendment to reply

2001-06-20 Thread Eduard Grinvald
You can't store to a variable, since your program is no longer there :) - Original Message - From: "Yacketta, Ronald" <[EMAIL PROTECTED]> Date: Wednesday, June 20, 2001 4:10 pm Subject: exec() > Folks, > > I have been searching perldoc, books and some online resources as > to a way > t

Re: exec()

2001-06-20 Thread Eduard Grinvald
Well, exec simply replaces your perl script with whatever you give it, so if you want redirection, just use '>' - Original Message - From: "Yacketta, Ronald" <[EMAIL PROTECTED]> Date: Wednesday, June 20, 2001 4:10 pm Subject: exec() > Folks, > > I have been searching perldoc, books and