What is the difference between Kill and Kill -9 command in Unix?
w
difference kill -9 pid and kill pid command - Ask Ubuntu https://askubuntu.com/questions/791841/difference-kill-9-pid-and-kill-pid-command
kill pid
(which sends signal 15 (SIGTERM)) tells pid
to terminate, but said program can execute some code first or even ignore the signal. kill -9 pid
, on the other hand, forces the program to immediately terminate (it cannot be ignored).
You should always try kill pid
first, as it allows the program to do things like saving/closing open files before exiting. Only use kill -9
when you need the program to close and it won't respond to a simple kill pid
.
https://www.quora.com/What-is-the-difference-between-Kill-and-Kill-9-command-in-Unix
kill
is used to send signal to a process. The default signal is TERM i.e. to terminate(kill) the process. Similar to End Task on windows task manager.
To terminate(kill) any ordinary process :
- kill <pid>
For a highly critical process, which kill
alone cannot terminate :
- kill -9 <pid>
where 99 is the strongest signal
https://en.wikipedia.org/wiki/Unix_signal#List_of_signals
SIGKILL 9 Terminate Kill (cannot be caught or ignored).
What is the difference between Kill and Kill -9 command in Unix?的更多相关文章
- 【转载】Linux kill, killall, kill -9
1) 查看进程的方法: ps -ef 或者 ps aux root 15087 0.0 0.0 0 0 ? S 23:31 0:00 [kwo ...
- linux命令kill和kill -9的区别
linux命令kill和kill -9的区别 2018年04月13日 16:53:07 坠入苦海销尘垢 阅读数 2854 转载自https://www.cnblogs.com/liuhouhou/ ...
- ps -ef|grep详解 、kill与kill -9的区别
ps -ef|grep详解 ps命令将某个进程显示出来 grep命令是查找 中间的|是管道命令 是指ps命令与grep同时执行 PS是LINUX下最常用的也是非常强大的进程查看命令 grep命令是查找 ...
- 【Linux常用命令】Linux kill, killall, kill -9,
参考链接 https://blog.csdn.net/zong596568821xp/article/details/77899454 kill + PID kill -9 + PID 加上-9 是 ...
- Linux kill, killall, kill -9
tyle="margin: 20px 0px 0px; font-size: 14px; line-height: 26px; font-family: Arial;"> 附 ...
- kill与kill -9的区别
有时候我们使用kill无法杀掉一个进程,但是用kill -9却可以,why? 首先看一下kill的功能,man手册对kill描述如下: KILL(1) Linux User's Manual KILL ...
- kill 与 kill -9(面试中问道的知识点)
转载自:http://www.2cto.com/os/201305/215267.html 需要特别说明的是,SIGKILL和SIGSTOP这两个信号既不能被应用程序捕获,也不能被操作系统阻塞或忽略. ...
- 授权其他数据库用户kill session
授权其他数据库用户kill session kill session权限 CREATE OR REPLACE PROCEDURE P_KILL_SESSION(P_USER IN VARCHAR2, ...
- MySQL连接线程kill利器之pt-kill
如何每10秒检查一次,杀死指定用户超过100秒的查询? pt-kill \ --no-version-check \ --host 127.0.0.1 --port 3306 --user 'xxxx ...
随机推荐
- JetBrains插件
1,翻译插件 TranslationPlugin 打开翻译对话框 : Ctrl + Shift + O(英文字母o) 鼠标取词并翻译 : Ctrl + Shift + Y http://yiiguxi ...
- 服务器上部署django项目流程?
1. 简单粗暴 项目开发完毕,在部署之前需要再配置文件中将 ALLOWED_HOSTS配置设置为:当前服务器IP或*,如: ALLOWED_HOSTS = ["*",] 然后将源码 ...
- P2586 [ZJOI2008]杀蚂蚁
传送门 快乐模拟,修身养性 代码长度其实还好,主要是细节多 只要知道一些计算几何基础知识即可快乐模拟,按着题目要求一步步实现就行啦 注意仔细读题,蚂蚁每 $5$ 秒乱走一次的时候是只要能走就走了,不一 ...
- “程序包com.sun.tools.javac.util不存在” 问题解决
最近工作中在编译打包项目的时候遇到了如标题所示的问题,报这个错误的类是 com.sun.tools.javac.util.Pair.问题很诡异,在Idea可以导入此类,项目启动运行也很正常,但就是在打 ...
- 前端UI库推荐(pc和移动)
此推荐个人喜好,不喜勿喷. 1. pc 端 elementUI (生态强大,样式生硬) iview (推荐,组件丰富) bootStrap layUI easyUi 2. 移动端 mintUI ant ...
- express热更新nodemon,自启动项目
一.说一下 每次修改文件,我们都需要重启服务器npm start,很麻烦,所以使用引入nodemon插件,解决这个问题,实现保存文件,即自启动刷新项目 二.直接开码 npm install nodem ...
- rest_framework框架的认证、权限
REST_FRAMEWORK = { "DEFAULT_AUTHENTICATION_CLASSES": ["app01.utils.TokenAuth", ] ...
- 使用Medusa美杜莎暴力破解SSH密码
使用Medusa美杜莎暴力破解SSH密码 1.Medusa简介 Medusa(美杜莎)是一个速度快,支持大规模并行,模块化的爆力破解工具.可以同时对多个主机,用户或密码执行强力测试.Medusa和hy ...
- 判断是否是iframe框架打开登录页, iframe框架着顶部页面刷新
if (window != top) top.location.href = location.href;
- NOIP2017 D1T1 小凯的疑惑
洛谷P3951 看到题目,很容易想到这一题是求使ax+by=c(a,b,c∈N)无非负整数解的最大c 由裴蜀定理可知方程一定有整数解(a,b互素,gcd(a,b)=1|c) 解法一:暴力枚举 看到题目 ...