Re: Creating a 'load simulator' by calling Perl Programs - or Forking?



pgodfrin <pgodfrin@xxxxxxxxx> wrote:

But - the question still remains - what's the best way to call other
perl programs? Exec, system or something else?

I'd do fork and exec. If you want to do something in the child after
the other thing was done, then I'd do fork and system.

Xho

--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
.



Relevant Pages

  • Re: [rfc] balance-on-fork NUMA placement
    ... the NUMA scheduler, and every time we decide it's a bad idea. ... cycle slower, not faster, so exec is generally a much better time to do ... There's no good predictor of whether we'll exec after fork, ... one reason to balance on forkrather than exec ...
    (Linux-Kernel)
  • Re: sched_domains SD_BALANCE_FORK and sched_balance_self
    ... > This has the intent info. ... Can you explain the purpose of doing balance on both fork and exec? ... Balance on clone make some sort of sense, ...
    (Linux-Kernel)
  • Re: RFC: implement daemon() in the kernel
    ... Except some special cases, fork() ... The child process is created and suspended, the parent continues to run ... until it calls exec() or _exit. ... You do have to look out for any applications that fork and do not either exit or exec, but that is so much better than having to modify so many things just to get them to run. ...
    (Linux-Kernel)
  • Re: How to tell when execv has succeeded
    ... in the traditional way using fork() and execv, ... Create a pipe. ... then you know that exec failed and why. ... which could mean that it could be closed by the function whether it succeeds ...
    (comp.unix.programmer)
  • Re: BEGIN, INIT etc...
    ... By using fork(), ofcourse! ... fork creates a clone of the current process, exec changes ... external program, on Unix, ends up calling exec. ... also want to set up signal handlers to pass signals along, ...
    (comp.lang.perl.misc)