« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 71 for signal (0.002 sec.)
pcntl_signal_get_handler — 指定されたシグナルの現在のハンドラを取得する | PHP 8... 10443
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() 関数は、 指定された signal ... ignal の現在のハンドラを取得します。 パラメータ signal シグナル番号 戻り値 この関数は、 SIG_DFL または SIG_IGN が参照する数値を返す可能性があります。 カスタムハンドラを設定してい ... る場合は、 callable を返します。 変更履歴 バージョン 説明 7.1.0 pcntl_signal_get_handler() 関数が追加されました。 例 例1 pcntl_signal_get_handler() の例 <?php var_dump ( pcntl_signal_get_handler ( SI ... GUSR1 )); // Outputs: int(0) function pcntl_test ( $signo ) {} pcntl_signal ( SIGUSR1 , 'pcntl_test' ); var_dump ( pcntl_signal_get_handler ( SIGUSR1 )); // Outputs: string(10) "pcntl_test" pcntl_si ...
https://man.mtool.work/php/8.3/function.pcntl-signal-get-handler.html
Event::signal — Constructs signal event object | PHP 8.3 10120
Event::signal (PECL event >= 1.2.6-beta) Event::signal — Constructs signal event object 説明 public static function Event::signal ( EventBase $base , int $signum , callable $cb , mixed $arg = ? ): Event Constructs signal event object. This ... is a straightforward method to create a signal event. Note, the generic Event::__construct() method can contruct signal event objects too. パラメータ base The associated ... event base object. signum The signal number. cb The signal event callback. See Event callbacks . arg Custom data. If specified, it will be passed to the callba ... ck when event triggers. 戻り値 Returns Event object on success. Otherwise false . 参考 Constructing signal events 他のマニュアルの関連ページ Linux JM signal(2) Python signal Linux JM signal(7) Linux JM bsd_signal(3) Linux JM sys_ ...
https://man.mtool.work/php/8.3/event.signal.html
pcntl_signal_dispatch — ペンディングシグナル用のハンドラをコールする | PHP 8.3 10120
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() がインストールしたシグナル ... ラメータ この関数にはパラメータはありません。 戻り値 成功した場合に true を、失敗した場合に false を返します。 例 例1 pcntl_signal_dispatch() の例 <?php echo "Installing signal handler...\n" ; pcntl_signal ( SIGHUP , function( $signo ) { echo "signal ha ... ndler called\n" ; }); echo "Generating signal SIGHUP to self...\n" ; posix_kill ( posix_getpid (), SIGHUP ); echo "Dispatching...\n" ; pcntl_signal_dispatch (); echo "D ... one\n" ; ?> 上の例の出力は、 たとえば以下のようになります。 Installing signal handler... Generating signal SIGHUP to self... Dispatching... signal handler called Done 参考 pcntl_signal() - シグナルハン ...
https://man.mtool.work/php/8.3/function.pcntl-signal-dispatch.html
Constructing signal events | PHP 8.3 10092
Constructing signal events Event can also watch for POSIX-style signals. To construct a handler for a signal, use Event::__construct() constructor with Event::SIGNAL flag, or Event::signal() factory method. 例1 Handling SIGTERM signal <?php ... /* Launch it in a terminal window: $ php examples/signal.php In another terminal window find out the pid and send SIGTERM, e.g.: $ ps aux | grep examp ruslan 3976 0.2 0.0 139896 1 ... 1256 pts/1 S+ 10:25 0:00 php examples/signal.php ruslan 3978 0.0 0.0 9572 864 pts/2 S+ 10:26 0:00 grep --color=auto examp $ kill -TERM 3976 At the first terminal windo ... w you should catch the following: Caught signal 15 */ class MyEventSignal { private $base , $ev ; public function __construct ( $base ) { $this -> base = $base ; $this -> ...
https://man.mtool.work/php/8.3/event.constructing.signal.events.html
Swoole\Process::signal — Send signal to the child processes. | PHP 8.3 10092
Swoole\Process::signal (PECL swoole >= 1.9.0) Swoole\Process::signal — Send signal to the child processes. 説明 public static function Swoole\Process::signal ( string $signal_no , callable $callback ): void パラメータ signal_no callback 戻り ... 値 If signal sent successfully, it returns TRUE, otherwise it returns FALSE. 他のマニュアルの関連ページ Linux JM signal(2) Python signa ... l Linux JM signal(7) Linux JM bsd_signal(3) Linux JM sysv_signal(3) Linux JM vfork(2) ...
https://man.mtool.work/php/8.3/swoole-process.signal.html
ssh2_send_signal — Send a signal to a remote process | PHP 8.3 9684
ssh2_send_signal (PECL ssh2 >= 1.5.0) ssh2_send_signal — Send a signal to a remote process 説明 function ssh2_send_signal ( resource $channel , string $signal ): bool Sends a signal to the process running at the remote end of the given chan ... is built against libssh2 >= 1.9.0. パラメータ channel An SSH channel stream, as returned by ssh2_exec() or ssh2_shell() . signal The name of the signal to send, without the SIG prefix, as defined by the SSH connection protocol ( » RFC 4254 ); for exam ... した場合に false を返します。 エラー / 例外 An E_WARNING is emitted when channel is not an SSH channel stream, and when the signal could not be sent. 例 例1 Interrupting a remote command <?php $connection = ssh2_connect ( 'shell.example.com' , 22 ); ssh ... tion , 'username' , 'password' ); $stream = ssh2_exec ( $connection , 'trap "echo interrupted" INT; sleep 60' ); ssh2_send_signal ( $stream , 'INT' ); stream_set_blocking ( $stream , true ); echo stream_get_contents ( $stream ); ?> 参考 ssh2_exec() - リ ...
https://man.mtool.work/php/8.3/function.ssh2-send-signal.html
pcntl_signal — シグナルハンドラを設定する | PHP 8.3 9558
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 が指すシグ ... ナルに関するハンドラを新たに設定するか、既存のハンドラを置き換えます。 パラメータ signal シグナル番号。 handler シグナルハンドラ。 callable を渡すと、それを実行してシグナルを処理します。 あるいは、グローバル定数 ... このパラメータのデフォルトは true ですが、 SIGALRM ではそのデフォルトは適用されません。 つまり、 restart_syscalls を渡さず、 signal が SIGALRM である場合、 システムコールの再スタートは無効になります。 SIGALRM でシステムコールの再スタートを有効にするには、 ... true を明示的に渡してください。 戻り値 成功した場合に true を、失敗した場合に false を返します。 エラー / 例外 signal が 1 未満または NSIG 以上の場合、あるいは handler が SIG_DFL と SIG_IGN のいずれでもない int の場合、 ValueError がスローさ ...
https://man.mtool.work/php/8.3/function.pcntl-signal.html
Swoole\Process::kill — Send signal to the child process. | PHP 8.3 9459
Swoole\Process::kill (PECL swoole >= 1.9.0) Swoole\Process::kill — Send signal to the child process. 説明 public static function Swoole\Process::kill ( int $pid , int $signal_no = ? ): bool Send signal to the child process. パラメータ pid P ... rocess pid signal_no Signal to be sent 戻り値 成功した場合に true を、失敗した場合に false を返します。 他のマニュアルの関連ページ Linux JM ... kill(2) Python signal Linux JM signal(7) Linux JM kill(1) Docker docker kill Linux JM signal(2) ...
https://man.mtool.work/php/8.3/swoole-process.kill.html
Event::add — Makes event pending | PHP 8.3 9150
Event::add (PECL event >= 1.2.6-beta) Event::add — Makes event pending 説明 public function Event::add ( float $timeout = ? ): bool Marks event pending. Non-pending event will never occur, and the event callback will never be called. In con ... ラメータ timeout Timeout in seconds. 戻り値 成功した場合に true を、失敗した場合に false を返します。 例 例1 Adding a custom signal <?php /* Launch it in a terminal window: $ php examples/signal.php In another terminal window find out the pid and send SI ... GTERM, e.g.: $ ps aux | grep examp ruslan 3976 0.2 0.0 139896 11256 pts/1 S+ 10:25 0:00 php examples/signal.php ruslan 3978 0.0 0.0 9572 864 pts/2 S+ 10:26 0:00 grep --color=auto examp $ kill -TERM 3976 At the first terminal windo ... w you should catch the following: Caught signal 15 */ class MyEventSignal { private $base , $ev ; public function __construct ( $base ) { $this -> base = $base ; $this -> ...
https://man.mtool.work/php/8.3/event.add.html
Event::__construct — Constructs Event object | PHP 8.3 8644
Event::__construct (PECL event >= 1.2.6-beta) Event::__construct — Constructs Event object 説明 public function Event::__construct ( EventBase $base , mixed $fd , int $what , callable $cb , mixed $arg = NULL ) Constructs Event object. パラメ ... nt base to associate with. fd stream resource, socket resource, or numeric file descriptor. For timer events pass -1 . For signal events pass the signal number, e.g. SIGHUP . what Event flags. See Event flags . cb The event callback. See Event callback ... s . arg Custom data. If specified, it will be passed to the callback when event triggers. 参考 Event::signal() - Constructs signal event object Event::timer() - Constructs timer event object 他のマニュアルの関連ページ Linux JM sign ... al(2) Python signal Linux JM signal(7) Python timerfd Linux JM rt_sigaction(2) Linux JM sigaction(2) ...
https://man.mtool.work/php/8.3/event.construct.html
PREV 1 2 3 4 5 6 7 8 NEXT