Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/305.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何杀死以root身份运行的不可修改的Python进程_Python_Macos_Proxy_Ssh_Transparentproxy - Fatal编程技术网

如何杀死以root身份运行的不可修改的Python进程

如何杀死以root身份运行的不可修改的Python进程,python,macos,proxy,ssh,transparentproxy,Python,Macos,Proxy,Ssh,Transparentproxy,我在10.7.3、MBA和最新固件更新上运行它时遇到了一个恼人的问题——在我停止它(ctrl+c两次)、连接松动或关闭盖子后,我无法恢复它,直到重新启动系统。重新启动所需的时间比正常情况下要长得多。我已经尝试刷新ipfw规则-没有帮助 您能告诉我如何恢复Shuttle连接(无需重新启动操作系统)吗 以下进程仍然以root用户身份运行,我不知道如何杀死它(尝试了sudo kill-9,但运气不佳): 我用于运行代理的命令: ./sshuttle --dns -r andrei@example.co

我在10.7.3、MBA和最新固件更新上运行它时遇到了一个恼人的问题——在我停止它(ctrl+c两次)、连接松动或关闭盖子后,我无法恢复它,直到重新启动系统。重新启动所需的时间比正常情况下要长得多。我已经尝试刷新ipfw规则-没有帮助

您能告诉我如何恢复Shuttle连接(无需重新启动操作系统)吗

以下进程仍然以root用户身份运行,我不知道如何杀死它(尝试了
sudo kill-9
,但运气不佳):

我用于运行代理的命令:

./sshuttle --dns -r andrei@example.com 10.0.0.0/8 -vv
我在尝试恢复连接时收到的最后一条消息:

...
firewall manager: starting transproxy.
 s:   Ready: 1 r=[4] w=[] x=[]
 s: <  channel=0 cmd=PING len=7
 s:  > channel=0 cmd=PONG len=7 (fullness=554)
 s: mux wrote: 15/15
 s: Waiting: 1 r=[4] w=[] x=[] (fullness=561/0)
>> ipfw -q add 12300 check-state ip from any to any
>> ipfw -q add 12300 skipto 12301 tcp from any to 127.0.0.0/8
>> ipfw -q add 12300 fwd 127.0.0.1,12300 tcp from any to 10.0.0.0/8 not ipttl 42 keep-state setup
>> ipfw -q add 12300 divert 12300 udp from any to 10.0.1.1/32 53 not ipttl 42
>> ipfw -q add 12300 divert 12300 udp from any 12300 to any not ipttl 42

这可能是superuserNo
u
flag的问题?我没有使用osx,但必须有一种方法来查找有关进程状态的更多信息。我同意@Etienne,这可能更适合超级用户。我同意这更适合超级用户的问题,但sshuttle是一个Python脚本,这里的Python程序员比超级用户多得多。要在那里找到答案需要很多时间。我已经试过用Shuttle的邮件列表直接询问作者-没有答案。以下是
ps
:superuser.com的手册页:如果它在你的电脑中还活着,我们可以杀死它。或者确切地说,你可以用
kill
向他们发送一个信号,但信号在从I/O队列移动到可运行进程队列之前不会传递到进程。这可能是superuserNo
u
标志的问题?我没有使用osx,但必须有一种方法来查找有关进程状态的更多信息。我同意@Etienne,这可能更适合超级用户。我同意这更适合超级用户的问题,但sshuttle是一个Python脚本,这里的Python程序员比超级用户多得多。要在那里找到答案需要很多时间。我已经试过用Shuttle的邮件列表直接询问作者-没有答案。下面是
ps
:superuser.com的手册页:如果它在你的电脑中是活动的,我们可以杀死它。或者确切地说,你可以用
kill
向他们发送信号,但信号在从I/O队列移动到可运行进程队列之前不会传递到进程。
...
firewall manager: starting transproxy.
 s:   Ready: 1 r=[4] w=[] x=[]
 s: <  channel=0 cmd=PING len=7
 s:  > channel=0 cmd=PONG len=7 (fullness=554)
 s: mux wrote: 15/15
 s: Waiting: 1 r=[4] w=[] x=[] (fullness=561/0)
>> ipfw -q add 12300 check-state ip from any to any
>> ipfw -q add 12300 skipto 12301 tcp from any to 127.0.0.0/8
>> ipfw -q add 12300 fwd 127.0.0.1,12300 tcp from any to 10.0.0.0/8 not ipttl 42 keep-state setup
>> ipfw -q add 12300 divert 12300 udp from any to 10.0.1.1/32 53 not ipttl 42
>> ipfw -q add 12300 divert 12300 udp from any 12300 to any not ipttl 42
$ ps -ajx | grep python
root            1611     1  1611 ffffff800d8b4e60    0 Us     ??    0:06.49 python ./main.py python -v -v --firewall 12300 12300
root           48844     1 48844 ffffff800d8b3b20    0 Us     ??    0:00.05 python ./main.py python -v -v --firewall 12299 12299
andrei         58541 55898 58540 ffffff800d8b40a0    2 R+   s000    0:00.01 grep python