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 ...
随机推荐
- [BZOJ 4332] [JSOI2012]分零食(DP+FFT)
[BZOJ 4332] [JSOI2012]分零食(DP+FFT) 题面 同学们依次排成了一列,其中有A位小朋友,有三个共同的欢乐系数O,S和U.如果有一位小朋友得到了x个糖果,那么她的欢乐程度就是\ ...
- 重写select
select 模拟 目前仿写select的方式 给tableIndex 来使 div(无法获取焦点的元素)来获取元素,这样便可以在失去焦点时,是否将下拉框收回 通过 document的点击,来判断是否 ...
- 同步锁 synchronized
package ba; public class Tongbu implements Runnable{ int i=100; public void run(){ while(true){ sell ...
- DOM属性和事件
1-22 DOM属性设置与获取 1.获取属性: getAttribute("attribute"): var p = document.getElementById(" ...
- Java设计模式之——代理设计模式
1.什么是代理设计模式 所谓代理模式是指客户端并不直接调用实际的对象,而是通过调用代理,来间接的调用实际的对象. 这里举一个栗子:就拿我们平时租房子来举例子,好比租客和房主之间的关系,我们租房子往往不 ...
- mdoc.samples - 用 -mdoc 编写 BSD 手册 的 示范教程
SYNOPSIS (总览) man mdoc.samples DESCRIPTION (描述) 这个 示范教程 用于 编写 BSD 手册页 (manual page), 它 使用了 -mdoc 宏定义 ...
- L3-015. 球队“食物链”
某国的足球联赛中有N支参赛球队,编号从1至N.联赛采用主客场双循环赛制,参赛球队两两之间在双方主场各赛一场. 联赛战罢,结果已经尘埃落定.此时,联赛主席突发奇想,希望从中找出一条包含所有球队的“食物链 ...
- shell脚本监控Tomcat并重启发送短信
#!/bin/sh TomcatID=$(ps -ef |grep tomcat |grep -w 'tomcat'|grep -v 'grep'|awk '{print $2}') StartTom ...
- 关于让左右2个DIV高度相等
哪个div Height值大,就将其值赋给Height值小的div,从而使2个div高度始终保持一 以下是代码: <!DOCTYPE html><html lang="en ...
- 关于下拉框的onchange事件和onclick选择value值。
下拉框的onchange事件和onclick,一般最好都选择onchange事件,onclick可能会不兼容有些浏览器. 下面是代码: <!DOCTYPE html><html la ...