The process is normally killed from the console with the command:

$ kill $pid 

In PHP I try to kill:

 exec('kill' . $pid,$out,$status); 

status returns 1. The process is not deleted. Root rights Why the process is not killed?

  • Try to send the signal number. - zalex
  • exec ('kill -9 $ pid', $ out, $ status); I tried it like this. doesn't work either - Kairat
  • What do you think 'kill $ pid' gives you? You probably forgot that only double quotes substitute the value of a variable. - zalex
  • Did you try to read the documentation? php.net/manual/en/function.posix-kill.php - 0andriy
  • tried to substitute the $ pid variable to substitute a number. does not work out - Kairat

0