How to kill a linux process using pid from php?

后端 未结 3 2034
夕颜
夕颜 2021-01-18 23:06

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

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-18 23:44

    Try posix_kill:

    bool posix_kill ( int $pid , int $sig )
    

    Send the signal sig to the process with the process identifier pid.

提交回复
热议问题