<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Kill command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-command/m-p/2615152#M884563</link>
    <description>&amp;lt;&lt;I have="" questions="" on="" kill="" command.="" when="" shall="" we="" use=""&gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Kill sends  a signal  to the process  id specified in the argument.  &lt;BR /&gt;eg: kill &lt;PID&gt;&lt;BR /&gt;By default kill sends the signal 15 to the pid.&lt;BR /&gt;which is actually kill -15  &lt;PID&gt;&lt;BR /&gt;Signal 15 is a software termination signal which asks the process to terminate gracefully, if possible.  That is why you see sometimes, the processes like automount do not get killed by signal 15, since 15 is not a compulsive kill signal.  &lt;BR /&gt;&lt;BR /&gt;Some common signals which are defined internally in Unix and used are :&lt;BR /&gt;Signal  2  -&amp;gt; Terminal interrupt  (control-C)&lt;BR /&gt;signal 3  -&amp;gt; create core image and quit&lt;BR /&gt;Signal  9  -&amp;gt; kill&lt;BR /&gt;Signal 15  -&amp;gt; software termination&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;WHY we="" face="" problem="" if="" we=""&gt;&lt;BR /&gt;&lt;BR /&gt;   Since kill 9 is a definite kill signal to the process,  the process tries to terminate immediately  but can hang since it could be waiting for I/O to end and does not have control to quit it.&lt;BR /&gt; &lt;BR /&gt;&amp;lt;&lt;I&gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;The best analogy can be, if your boss summons, you cannot ignore him and have to respond to it immediately,  that makes your boss a Signal 9. Whereas the rest of whom you can ignore or put in the backburner become signal 15 ;-)&lt;BR /&gt;&lt;BR /&gt;Another example:&lt;BR /&gt;&lt;BR /&gt;***&lt;BR /&gt;trap 'echo You sent me signal2 but i will not exit hhaaa haaa'  2&lt;BR /&gt;while (true)&lt;BR /&gt;  do&lt;BR /&gt;    echo 'program running'&lt;BR /&gt;done&lt;BR /&gt;***&lt;BR /&gt;&lt;BR /&gt; When you run this progam  and press control-C&lt;BR /&gt;it will  give the message -you sent me a signal2-;  , but will not exit.&lt;BR /&gt;But you cannot do the same to a signal 9. i.e&lt;BR /&gt;it cannot be "trapped". It is the boss.&lt;BR /&gt;&lt;BR /&gt;-raj (remembering some old unix lessons).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/WHY&gt;&lt;/PID&gt;&lt;/PID&gt;&lt;/I&gt;</description>
    <pubDate>Fri, 16 Nov 2001 04:56:15 GMT</pubDate>
    <dc:creator>Roger Baptiste</dc:creator>
    <dc:date>2001-11-16T04:56:15Z</dc:date>
    <item>
      <title>Kill command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-command/m-p/2615146#M884552</link>
      <description>Dear all,&lt;BR /&gt;  I have questions on kill command. When shall we use # kill -9 PID and&lt;BR /&gt;       # kill PID?&lt;BR /&gt;&lt;BR /&gt;  Why we face problem if we # kill -9 automount?&lt;BR /&gt; &lt;BR /&gt;  I've gone through the manpage it mentions signal 9 can't be trapped and signal 15 can be trapped. May I know what does it mean?&lt;BR /&gt; &lt;BR /&gt;  Thanks in advanced.</description>
      <pubDate>Fri, 16 Nov 2001 03:49:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-command/m-p/2615146#M884552</guid>
      <dc:creator>Hill_1</dc:creator>
      <dc:date>2001-11-16T03:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Kill command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-command/m-p/2615147#M884554</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Kill -9 is a slaughter and Kill -15 is gracefull Kill.&lt;BR /&gt;&lt;BR /&gt;If kill with other option doesn't work kill -9.&lt;BR /&gt;&lt;BR /&gt;-USA..</description>
      <pubDate>Fri, 16 Nov 2001 03:52:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-command/m-p/2615147#M884554</guid>
      <dc:creator>Uday_S_Ankolekar</dc:creator>
      <dc:date>2001-11-16T03:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Kill command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-command/m-p/2615148#M884556</link>
      <description>Your process, be it an executable or a simple shell script, can 'trap' or detect signals other than 9. You can setup a 'signal handler' to do stuff on receipt of signals - maybe remove temp files, write a log message, etc. on receipt of a particular signal.&lt;BR /&gt;But signal 9 cannot be trapped - as soon as a process gets signal 9, it exits pronto. What is called an 'ungraceful exit'.&lt;BR /&gt;&lt;BR /&gt;see man signal for details.&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Nov 2001 04:35:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-command/m-p/2615148#M884556</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2001-11-16T04:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Kill command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-command/m-p/2615149#M884558</link>
      <description>Try to avoid using kill -9&lt;BR /&gt;&lt;BR /&gt;Have a look at the the link below.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0xf396abe92dabd5118ff10090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0xf396abe92dabd5118ff10090279cd0f9,00.html&lt;/A&gt;</description>
      <pubDate>Fri, 16 Nov 2001 04:39:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-command/m-p/2615149#M884558</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2001-11-16T04:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Kill command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-command/m-p/2615150#M884560</link>
      <description>Unwise use of kill -9 is one of the most common sys admin errors. Kill -9 should be used as a  weapon of last resort. The reason it is bad is that no cleanup is (or can be) done. Temp files are not removed, shared memory, semaphores, and message queques are not removed/detached. In your case those pesky /tmp_mnt entries are left in limbo. If you must kill something, I would do it in this order kill -15, kill -1, kill -2, kill -11, and if and only if you REALLY need to then kill it do you use kill -9. In most cases, kill -11 is almost as sure a kill and does do cleanup.&lt;BR /&gt;&lt;BR /&gt;Clay</description>
      <pubDate>Fri, 16 Nov 2001 04:41:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-command/m-p/2615150#M884560</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-11-16T04:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Kill command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-command/m-p/2615151#M884562</link>
      <description>Deja Vu!&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x0f77972194d6d5118ff40090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x0f77972194d6d5118ff40090279cd0f9,00.html&lt;/A&gt;</description>
      <pubDate>Fri, 16 Nov 2001 04:41:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-command/m-p/2615151#M884562</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2001-11-16T04:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Kill command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-command/m-p/2615152#M884563</link>
      <description>&amp;lt;&lt;I have="" questions="" on="" kill="" command.="" when="" shall="" we="" use=""&gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Kill sends  a signal  to the process  id specified in the argument.  &lt;BR /&gt;eg: kill &lt;PID&gt;&lt;BR /&gt;By default kill sends the signal 15 to the pid.&lt;BR /&gt;which is actually kill -15  &lt;PID&gt;&lt;BR /&gt;Signal 15 is a software termination signal which asks the process to terminate gracefully, if possible.  That is why you see sometimes, the processes like automount do not get killed by signal 15, since 15 is not a compulsive kill signal.  &lt;BR /&gt;&lt;BR /&gt;Some common signals which are defined internally in Unix and used are :&lt;BR /&gt;Signal  2  -&amp;gt; Terminal interrupt  (control-C)&lt;BR /&gt;signal 3  -&amp;gt; create core image and quit&lt;BR /&gt;Signal  9  -&amp;gt; kill&lt;BR /&gt;Signal 15  -&amp;gt; software termination&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;WHY we="" face="" problem="" if="" we=""&gt;&lt;BR /&gt;&lt;BR /&gt;   Since kill 9 is a definite kill signal to the process,  the process tries to terminate immediately  but can hang since it could be waiting for I/O to end and does not have control to quit it.&lt;BR /&gt; &lt;BR /&gt;&amp;lt;&lt;I&gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;The best analogy can be, if your boss summons, you cannot ignore him and have to respond to it immediately,  that makes your boss a Signal 9. Whereas the rest of whom you can ignore or put in the backburner become signal 15 ;-)&lt;BR /&gt;&lt;BR /&gt;Another example:&lt;BR /&gt;&lt;BR /&gt;***&lt;BR /&gt;trap 'echo You sent me signal2 but i will not exit hhaaa haaa'  2&lt;BR /&gt;while (true)&lt;BR /&gt;  do&lt;BR /&gt;    echo 'program running'&lt;BR /&gt;done&lt;BR /&gt;***&lt;BR /&gt;&lt;BR /&gt; When you run this progam  and press control-C&lt;BR /&gt;it will  give the message -you sent me a signal2-;  , but will not exit.&lt;BR /&gt;But you cannot do the same to a signal 9. i.e&lt;BR /&gt;it cannot be "trapped". It is the boss.&lt;BR /&gt;&lt;BR /&gt;-raj (remembering some old unix lessons).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/WHY&gt;&lt;/PID&gt;&lt;/PID&gt;&lt;/I&gt;</description>
      <pubDate>Fri, 16 Nov 2001 04:56:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-command/m-p/2615152#M884563</guid>
      <dc:creator>Roger Baptiste</dc:creator>
      <dc:date>2001-11-16T04:56:15Z</dc:date>
    </item>
  </channel>
</rss>

