Xu Wei Jie Posted March 23, 2009 Share Posted March 23, 2009 Is there a function call to kill all existing PHP processes? I am currently having system() to fork multiple instances and wish to kill them all by invoking that function. exit and die would not work because it only kills off 1 process. Link to comment https://forums.phpfreaks.com/topic/150687-killing-off-processes-in-php/ Share on other sites More sharing options...
shadiadiph Posted March 23, 2009 Share Posted March 23, 2009 kills most things dead session_destroy(); header("Location: index.php"); exit; Link to comment https://forums.phpfreaks.com/topic/150687-killing-off-processes-in-php/#findComment-791609 Share on other sites More sharing options...
Xu Wei Jie Posted March 23, 2009 Author Share Posted March 23, 2009 However, I am not writing a web application but console based. session won't help, right? Link to comment https://forums.phpfreaks.com/topic/150687-killing-off-processes-in-php/#findComment-791948 Share on other sites More sharing options...
Maq Posted March 23, 2009 Share Posted March 23, 2009 What os are you on? If you're on linux you can do something like: shell_exec("killall php"); Link to comment https://forums.phpfreaks.com/topic/150687-killing-off-processes-in-php/#findComment-791953 Share on other sites More sharing options...
Xu Wei Jie Posted March 23, 2009 Author Share Posted March 23, 2009 I am on windows. But i need to make it platform independent. And I do have 1 particular PHP process which I do not wish to kill. the others i want to kill them all. Link to comment https://forums.phpfreaks.com/topic/150687-killing-off-processes-in-php/#findComment-791971 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.