Re: 'system' and parallel execution (was: Re: How to call a perl script....)

From: U235sentinel (u235sentinel_at_comcast.net)
Date: 06/25/04


Date: Fri, 25 Jun 2004 11:12:29 -0600
To: Wiggins d Anconia <wiggins@danconia.org>


Wiggins d Anconia wrote:

>It's dangerous to make blanket statements like this. Each is a tool that
>should be understood and applied in the right manner.
>
I agree with this. Generally system would be the right fit for many of
my Perl programs. However exec has it's place like any tool.

>That is why it is
>more important to understand the concepts of process execution,
>parallelism, blocking, etc. rather than any one particular function.
>'system' is really just a combination of a fork+exec+waitpid model that
>is easy to use, the backticks are similar to the open pipe model, but
>generally easier to use as well, the open pipe model is really just a
>fancy version of the same fork+exec+waitpid model. So some would claim
>you should use fork+exec+waitpid, because 'system' really just uses
>them, others would say that is the beauty of Perl, 'system' provides a
>very good shortcut, assuming it accomplishes the goal.
>
hmm... So system could generate zombie processes? Or a filehandle
process?

I guess it really depends on what we are kicking off and whether it
exists cleanly.