環境:Mac、php7.1、nginx
現象:killall php-fpm,php-fpm自動重啟

共有如下幾種解決方案:
1.檢查php-fpm.conf的deamonize模式是否開啟
2.查找系統下有自動加載模塊的關鍵字,修改對應配置文件的nodaemonize參數(grep -rn "nodaemonize" *)

3.因為我是通過homebrew裝的php7.1,所以自動加入了開機自啟
查看所有啟動任務( launchctl list)、移除配置(launchctl remove <name_from_list_command>)
相關命令:
查看php進程(e:顯示所有程序 f:顯示樹狀結構,顯示父id) ps -ef |grep php
查看9000端口所有的程序(a:顯示終端所有的程序 u:以用戶為主的格式 x:顯示所有程序)ps aux | grep 9000、 ps aux|grep php-fpm
強制終止(kill -9)
快速關閉(kill -INT $pid )
平滑升級(kill -USR2)
參考資料:
https://www.jianshu.com/p/2400c2d0178a
https://www.cnblogs.com/pawn-i/p/12804477.html
https://blog.51cto.com/devin223/1664928
