2011-11-23 28 views
1

可能重复:
How can I fire and forget a process in Perl?如何从Perl作为一个单独的过程启动程序?

我正在寻找一种方式来从Perl脚本调用一个新的进程,这将让启动的程序和Perl脚本,从它已启动,并行工作。如果它很重要,程序是SIPp

谢谢。

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

回答

2

如果你真的想分开过程,那么另一种选择是forkexec

if (fork) { 
    # In the parent program 
    # Continue as usual 
    ... 
} else { 
    # In the new child program 
    # Replace with another program 
    exec $some_other_program; 
} 
1

SIPp具有“-bg”命令行参数。

此参数在后台模式下启动SIPp。

0

在Windows系统中,您可以使用“开始”命令。

例如:

启动记事本

OR

启动/ d “C:\ Program Files文件\ Sipp3.1” sipp.exe -sn UAC

相关问题