0

ps -ef |grep php
找到pid kil -9 pid 发现杀了后 还要一个一个删除

root 18738 1 0 12:12 pts/6 00:00:00 php server2.php
root 18739 1 0 12:12 pts/6 00:00:00 php server2.php
root 18740 1 0 12:12 pts/6 00:00:00 php server2.php
root 18741 1 0 12:12 pts/6 00:00:00 php server2.php
root 18742 1 0 12:12 pts/6 00:00:00 php server2.php
root 18743 1 0 12:12 pts/6 00:00:00 php server2.php
root 18744 1 0 12:12 pts/6 00:00:00 php server2.php
root 18745 1 0 12:12 pts/6 00:00:00 php server2.php
root 18820 18773 0 12:23 pts/8 00:00:00 grep --color=auto php
[root@iZwz96o0ziwb6z9x30b2oiZ jiahuatest]# kill -9 18738 18739 18740 18741 18742

2019-09-14 提问
1 个回答
0

已采纳

你直接kill -9 PID杀了父进程,它的子进程成了孤儿进程。。
你找到父进程,kill就行了,不用-9

比如:

root      6024  5724  0 13:06 pts/0    00:00:00 php Server.php
root      6025  6024  0 13:06 pts/0    00:00:00 php Server.php
root      6028  6025  0 13:06 pts/0    00:00:00 php Server.php
root      6029  6025  0 13:06 pts/0    00:00:00 php Server.php
root      6030  6025  0 13:06 pts/0    00:00:00 php Server.php
root      6031  6025  0 13:06 pts/0    00:00:00 php Server.php
root      6032  6025  0 13:06 pts/0    00:00:00 php Server.php
root      6033  6025  0 13:06 pts/0    00:00:00 php Server.php
root      6034  6025  0 13:06 pts/0    00:00:00 php Server.php
root      6035  6025  0 13:06 pts/0    00:00:00 php Server.php

杀的话就kill 6024

撰写答案

推广链接