1

Possible Duplicate:
How can I fire and forget a process in Perl?

I'm looking for a way to invoke a new process from a Perl script, that will let a launched program and a Perl script, from which it's launched, proceed to work concurrently.

The program is SIPp, if it's important.

Thank you.

Community
  • 1
  • 1
evgeny9
  • 1,381
  • 3
  • 17
  • 31
  • 3
    http://stackoverflow.com/questions/2133910/how-can-i-fire-and-forget-a-process-in-perl http://stackoverflow.com/questions/2711520/how-can-i-run-perl-system-commands-in-the-background http://stackoverflow.com/questions/4053093/how-can-i-make-fork-in-perl-in-different-scripts http://stackoverflow.com/questions/8157848/how-to-spawn-other-programs-within-perl-script-and-immediately-continue-perl-programs – daxim Nov 23 '11 at 10:53

4 Answers4

2

If you actually want separate processes, then another option is fork and exec.

if (fork) {
  # In the parent program
  # Continue as usual
  ...
} else {
  # In the new child program
  # Replace with another program
  exec $some_other_program;
}
Dave Cross
  • 68,119
  • 3
  • 51
  • 97
1

SIPp has "-bg" commandline parameter.

This parameter launches SIPp in background mode.

evgeny9
  • 1,381
  • 3
  • 17
  • 31
Stigor
  • 11
  • 1
1

Use Proc::Background

proctor
  • 41
  • 2
0

In Windows system you may use "start" command.

For example:

start notepad

OR

start /d"C\Program Files\Sipp3.1" sipp.exe -sn uac

Stigor
  • 11
  • 1