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).
最新文章
- POJ3693 Maximum repetition substring [后缀数组 ST表]
- 使用yield关键字让自定义集合实现foreach遍历
- 昨天晚上也弄不清楚是自己密码被盗了还是由于ip冲突
- 如何使用Visual Studio 2013 创建Azure云应用
- [Windows编程] 使用AttachThreadInput 来捕捉其它窗口的键盘输入
- 简单区分`:before`与`::before`的区别
- CDockablePane 记忆界面布局的问题
- java之JDK的环境变量配置
- spring JdbcTemplate 在itest 开源测试管理项目中的浅层(5个使用场景)封装
- MATLAB关系运算符和逻辑运算符
- 07_mysql常用sql语句
- Flask--Web From 表单
- nodejs学习笔记<;七>; 路由
- JVM进程cpu飙高分析
- [转]mysql 行转列 列转行
- Numpy 利用数组进行数据处理
- 2018.09.16 codeforces1041C. Coffee Break(双端队列)
- Maven pom.xml 报 Missing artifact jdk.tools:jdk.tools:jar:1.7
- 实时刷新winform中的某一个控件上的文字
- 沉淀,再出发:XPath的理解和使用
热门文章
- ajax异步加载分页评论带点赞功能
- go &; RabbitMQ
- “百度杯”CTF比赛 十一月场--CrackMe01
- js工厂函数创建对象与对象构造函数的理解
- 关于JSON.parse(JSON.stringify(obj))实现深拷贝应该注意的坑
- 034-openstack中虚拟机启动后主机名设置问题
- zookeeper之一 安装和配置(单机+集群)
- babel 转换箭头函数
- 在国外搭建 Web 服务器 - Linode VPS
- vue.js动态表格增删改代码