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 ...
随机推荐
- Codeforces 1262D Optimal Subsequences(BIT+二分)
首先比较容易想到肯定是前k大的元素,那么我们可以先对其进行sort,如果数值一样返回下标小的(见题意),接下里处理的时候我们发现需要将一个元素下标插入到有序序列并且需要访问第几个元素是什么,那么我们可 ...
- P1168 中位数 堆
题目描述 给出一个长度为NN的非负整数序列A_iAi,对于所有1 ≤ k ≤ (N + 1) / 21≤k≤(N+1)/2,输出A_1, A_3, …, A_{2k - 1}A1,A3,…,A2 ...
- P2523 [HAOI2011]Problem c
传送门 先考虑如何判断无解,设 $sum[i]$ 表示确定的人中,编号大于 $i$ 的人的人数 如果 $sum[i]>n-i+1$ 则无解,进一步考虑设 $f[i][j]$ 表示当前确定完编号大 ...
- Neo4j清空所有数据
两种方法: 一.用下列 Cypher 语句: match (n) detach delete n 二. 1.停掉服务: 2.删除 graph.db 目录: 3.重启服务. 原文地址:http://ne ...
- MySQL第一讲 一一一一 数据库入门
一. MySQL简介与安装 MySQL是一个关系型数据库管理系统,由瑞典MySQL AB 公司开发,目前属于 Oracle 旗下产品.MySQL 是最流行的关系型数据库管理系统之一,在 WEB 应用方 ...
- 富文本编辑器Ueditor
一.大概使用: 官网:http://ueditor.baidu.com/website/download.html 使用:[参考index.html] 3.1 引入ueditor的js <scr ...
- shell字符串拼接
name="Shell" url="http://c.biancheng.net/shell/" str1=$name$url #中间不能有空格 str2=&q ...
- 原始http下载图片生成文件
package com.example.demo.util; import java.io.*;import java.net.URL;import java.net.URLConnection;im ...
- 自定义任务状态来操作FreeRTOS任务的挂起,恢复,删除
osThreadState osState2;//自定义一个线程的状态 osThreadState 系统枚举定义如下: typedef enum { osThreadRunning = 0x0, /* ...
- cocos随笔
随笔: [ 1 ] active能隐藏元素,且不占空间,但仍存在,索引时,仍能得到 [ 2 ] 碰到参数传不进去的时候可以试着用属性赋值的方法代替传参 [ 3 ] getChildByName是按照 ...