I am facing one issue regarding killing a Linux process from my php code.
I am running a Scrapy tool from my php code using the proc_open()
function in the back
You can use exec with sudo privileges for skill that is more safer check out kill users processes in linux with php
Thanks & Regards,
Alok Thaker
Never, ever, give apache sudo
permissions!
Use exec("kill -9 $pid");
- your apache process started it, it can kill it :)
Try posix_kill:
bool posix_kill ( int $pid , int $sig )
Send the signal sig to the process with the process identifier pid.