!!!参考ページ !Tips / TARO's Note *http://www.bioinfo.jp/tips.html ""サーバによるタイムアウトを回避&重い処理の保護 ""重い処理が終了するまで待ちたいがそのままではタイムアウトしてしまう場合など。 ブラウザが中断しても処理は中断しない。 *サンプルCGIスクリプト(Perl) #!/usr/bin/perl sub handler { print "処理中です。\n"; alarm 10; } $| = 1; print "Content-type: text/plain\n\n"; my $pid = fork; die unless defined $pid; # fork 失敗で異常終了 if($pid) { # 親プロセス print "処理を開始しました。\n"; $SIG{ALRM} = \&handler; alarm 10; wait; alarm 0; print "処理を終了しました。\n"; exit; } # 子プロセス close STDOUT; #以下、長い処理