PHP
downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

pcntl_exec> <PCNTL 関数
Last updated: Fri, 30 Jan 2009

view this page in

pcntl_alarm

(PHP 4 >= 4.3.0, PHP 5)

pcntl_alarmシグナルを送信するアラームを設定する

説明

int pcntl_alarm ( int $seconds )

プロセスに対して、 指定した秒数後に SIGALRM シグナルを送信するタイマーを作成します。 pcntl_alarm() をコールすると、 それまでに設定されていたアラームはすべて取り消されます。

パラメータ

seconds

待機する秒数。seconds がゼロの場合は、 新しいアラームは作成されません。

返り値

それまでに予定されていたアラームの予定時刻までの秒数を返します。 事前に予定されていたアラームがなかった場合には 0 を返します。



add a note add a note User Contributed Notes
pcntl_alarm
j at ukr-info dot net
20-Oct-2005 02:51
<?php
   
declare(ticks = 1);

    function
signal_handler($signal) {
        print
"Caught SIGALRM\n";
       
pcntl_alarm(5);
    }

   
pcntl_signal(SIGALRM, "signal_handler", true);
   
pcntl_alarm(5);

    for(;;) {
    }

?>

pcntl_exec> <PCNTL 関数
Last updated: Fri, 30 Jan 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites