from what I remember reading and was told as a best practice using exec 
/.../..../ was recommended over system.  For this reason exec does not 
create a child and therefore does not have to wait.  the perl process 
itself runs the command or program.  what are the pros and cons of each?

thanks


Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams






u235sentinel <[EMAIL PROTECTED]>
06/25/2004 11:58 AM

 
        To: 
        cc:     [EMAIL PROTECTED]
        Subject:        Re: 'system' and parallel execution (was: Re: How to call a 
perl 
script....)




Wiggins d Anconia wrote:

>
>Not exactly, it has been forked and does technically run in parallel,
>however 'system' blocks your current process waiting for the child to
>finish, so your process is in fact running, but it won't be doing any
>work except for waiting for a signal from the child.
>
>There are other ways to have parallel execution,
>
>perldoc perlipc
>perldoc -f fork
>perldoc -f system
>
Ok.  I'll read those in a minute.  After reviewing Learning Perl, I 
realize I need to open the process as a file handle for parallel 
operations.  Called a "piped open". (page 201 Oreilly Learning Perl).

>Will get you started. "Network Programming with Perl" by Lincoln Stein
>also has excellent chapters on this subject, though lacks a chapter
>(probably because of its age) on POE.
> 
>
Haven't purchased that book yet (it's on my amazon wish list however). 
I'll check it out.

Thanks!


Reply via email to