android的Killprocess

来源:互联网 发布:淮南大数据展示中心 编辑:程序博客网 时间:2024/06/05 02:42

Process的方法

killProcess(int pid)

Kill the process with the given PID.

Kill the process with the given PID. Note that, though this API allows us to request to kill any process based on its PID, the kernel will still impose standard restrictions on which PIDs you are actually able to kill. Typically this means only the process running the caller's packages/application and any additional processes created by that app;packages sharing a common UID will also be able to kill each other's processes.

killprocess 只能杀死运行当前app的进程或者当前app创建的进程,当然其他进程有相同的进程id也可以被杀死。

除此之外killprocess无法杀死其他进程,执行此函数不会产生任何反馈






0 0
原创粉丝点击