php-pcntlHow to kill a process with PHP PCNTL?
Using the PHP PCNTL extension, you can kill a process with the pcntl_kill() function.
<?php
$pid = 1234;
pcntl_kill($pid, SIGKILL);
The pcntl_kill() function takes two parameters:
$pid- The process ID of the process to be killed.SIGKILL- The signal to be sent to the process. In this case,SIGKILLis used to force the process to terminate.
For more information, see the PHP PCNTL documentation.
More of Php Pcntl
- How to use PCNTL alarm in PHP?
- How to use pcntl_wifexited in PHP?
- How to use pcntl_wexitstatus in PHP?
- How to use pcntl_waitpid in PHP?
- How to install PCNTL for PHP in Debian?
- How to use pcntl_signal in PHP?
- How to get the process ID with PHP PCNTL?
- How to install PCNTL for PHP using Brew?
- How to use pcntl_wait in PHP?
- How to use pcntl_fork in PHP?
See more codes...