How to kill a linux process using pid from php?

后端 未结 3 2031
夕颜
夕颜 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:37

    Never, ever, give apache sudo permissions!

    Use exec("kill -9 $pid"); - your apache process started it, it can kill it :)

提交回复
热议问题