« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 6 of about 6 for signo (0.003 sec.)
pcntl_signal — シグナルハンドラを設定する | PHP 8.3 11753
pcntl_signal (PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8) pcntl_signal — シグナルハンドラを設定する 説明 function pcntl_signal ( int $signal , callable | int $handler , bool $restart_syscalls = true ): bool pcntl_signal() 関数は、 signal が指すシグ ... 復活させることを表します。 callable を渡す場合は、次のシグネチャを実装したものでなければいけません。 function handler ( int $signo , mixed $siginfo ): void signo 処理するシグナル。 siginfo OS が siginfo_t 構造体をサポートしている場合、 これはシグナルに依 ... 供されます。 例 例1 pcntl_signal() の例 <?php pcntl_async_signals ( true ); // シグナルハンドラ関数 function sig_handler ( $signo ) { switch ( $signo ) { case SIGTERM : // シャットダウンの処理 exit; break; case SIGHUP : // 再起動の処理 break; case SIGU ...
https://man.mtool.work/php/8.3/function.pcntl-signal.html
基本的な使用法 | PHP 8.3 11497
基本的な使用法 この例は、シグナルハンドラを有するデーモンプロセスをフォークします。 例1 プロセス制御の例 <?php pcntl_async_signals ( true ); $pid = pcntl_fork (); if ( $pid == - 1 ) { die( "fork できません" ); } else if ( $pid ) { exit(); / ... SIGHUP , "sig_handler" ); // 無限ループでタスク実行 while ( 1 ) { // 何か面白いことをここで行う } function sig_handler ( $signo ) { switch ( $signo ) { case SIGTERM : // 終了タスクを処理 exit; break; case SIGHUP : // 再起動タスクを処理 break; default ...
https://man.mtool.work/php/8.3/pcntl.example.html
pcntl_signal_dispatch — ペンディングシグナル用のハンドラをコールする | PHP 8.3 8499
pcntl_signal_dispatch (PHP 5 >= 5.3.0, PHP 7, PHP 8) pcntl_signal_dispatch — ペンディングシグナル用のハンドラをコールする 説明 function pcntl_signal_dispatch (): bool pcntl_signal_dispatch() 関数は、 pcntl_signal() がインストールしたシグナル ... ます。 例 例1 pcntl_signal_dispatch() の例 <?php echo "Installing signal handler...\n" ; pcntl_signal ( SIGHUP , function( $signo ) { echo "signal handler called\n" ; }); echo "Generating signal SIGHUP to self...\n" ; posix_kill ( posix_getpid (), SIGH ...
https://man.mtool.work/php/8.3/function.pcntl-signal-dispatch.html
pcntl_signal_get_handler — 指定されたシグナルの現在のハンドラを取得する | PHP 8... 8262
pcntl_signal_get_handler (PHP 7 >= 7.1.0, PHP 8) pcntl_signal_get_handler — 指定されたシグナルの現在のハンドラを取得する 説明 function pcntl_signal_get_handler ( int $signal ): callable | int pcntl_signal_get_handler() 関数は、 指定された s ... ignal_get_handler() の例 <?php var_dump ( pcntl_signal_get_handler ( SIGUSR1 )); // Outputs: int(0) function pcntl_test ( $signo ) {} pcntl_signal ( SIGUSR1 , 'pcntl_test' ); var_dump ( pcntl_signal_get_handler ( SIGUSR1 )); // Outputs: string(10) "pc ...
https://man.mtool.work/php/8.3/function.pcntl-signal-get-handler.html
pcntl_sigwaitinfo — シグナルを待つ | PHP 8.3 7750
pcntl_sigwaitinfo (PHP 5 >= 5.3.0, PHP 7, PHP 8) pcntl_sigwaitinfo — シグナルを待つ 説明 function pcntl_sigwaitinfo ( array $signals , array &$info = [] ): int | false pcntl_sigwaitinfo() は、 呼び出し元のスクリプトの実行をいったん停止させ、 ... ルの配列。 info シグナルについての情報を含む配列が info に設定されます。 次の要素は、すべてのシグナルについて設定されます。 signo: シグナル番号 errno: エラー番号 code: シグナルコード 次の要素は、 SIGCHLD シグナルの場合に設定されます。 status: 終了値ある ...
https://man.mtool.work/php/8.3/function.pcntl-sigwaitinfo.html
pcntl_waitid — 子プロセスの状態変化を待つ | PHP 8.3 7000
pcntl_waitid (PHP 8 >= 8.4.0) pcntl_waitid — 子プロセスの状態変化を待つ 説明 function pcntl_waitid ( int $idtype = P_ALL , ? int $id = null , array &$info = [] , int $flags = WEXITED , array &$resource_usage = [] ): bool 呼び出し元の子プロセ ... セスを待ちます。 info info には、 シグナルに関する情報を含めた情報を設定します。 info 配列には、以下のキーが含まれています: signo : Signal number errno : System error number code : Signal code status : Exit value or signal pid : Sending process ID uid ...
https://man.mtool.work/php/8.3/function.pcntl-waitid.html
PREV 1 NEXT