私のメインプログラムでは、次を使用して子をフォークします。
pid = fork();
if ($pid == 0) {
exec("$wrapper_file $hours_run");
exit 0;
}
そして他の仕事をします。
そして私のラッパーファイルで:
$test_run = time();
while ($test_run < $hours_run) {
do $node_grp_submit; # -------------------->script does some work
sleep 30;
$test_run = time();
}
4 時間実行すると、スクリプトは正常に動作します。
しかし、長時間 (たとえば 5 ~ 8 時間) 実行すると、ラッパー スクリプトは
Undefined subroutine &main::fatal called at wrapper.pl
.