可能性の重複:
How can I run Perl system commands in the background?戻り値を待たない「システム」のようなPerl関数はありますか?
私はif文の結果に依存して別のプロセスを、トリガの単純なPerlプログラムを持っています。しかし、トリガーされたプロセスが完了するまで、コマンドを送信し続けることはできません。これは、 'system'関数がプロセスの戻り値を待ってから続行するためです。
while (bla bla bla) {
if (command is bla) {
system("osascript 'something.app'");
} else {
print $client "invalid command\r\n";
}
} continue {
…etc
要するに、私のスクリプトはsomething.appから何か聞こえるまで続けられません。これを何とかしていますか?
それは[FAQ](http://learn.perl.org/faq/perlfaq8.html#How-do-です私はバックグラウンドでプロセスを開始する)。以前のSO: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-in-the-background http://stackoverflow.com/questions/4053093/how-can-i-make-fork-in-perl-in-different-scripts – daxim