zoukankan      html  css  js  c++  java
  • 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 :

    1. kill <pid>

    For a highly critical process, which kill alone cannot terminate :

    1. 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).

  • 相关阅读:
    将一个float型转化为内存存储格式的步骤
    判断是否是中文、英文字符串
    打开文件对话框
    线性表之四,受限的线性表,队列
    线性表之三,受限的线性表,栈
    数据结构
    List
    SamplesHashtable
    Exception
    maven指定本地仓库
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6832086.html
Copyright © 2011-2022 走看看