2011-11-23 77 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

相關問題