<?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: Trap signal in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/trap-signal/m-p/3337191#M746751</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;What is the signal for Delete button?&lt;BR /&gt;&lt;BR /&gt;regards.</description>
    <pubDate>Wed, 21 Jul 2004 04:30:07 GMT</pubDate>
    <dc:creator>Ngoh Chean Siung</dc:creator>
    <dc:date>2004-07-21T04:30:07Z</dc:date>
    <item>
      <title>Trap signal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trap-signal/m-p/3337189#M746749</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;For /etc/profile, there is a line called trap. To enable, put as trap 1 2 3. To disable, put as trap "" 1 2 3.&lt;BR /&gt;&lt;BR /&gt;Questions:&lt;BR /&gt;1) How about trap : 1 2 3?&lt;BR /&gt;2) What I know is signal 1 for hang up, 2 for interrupt and 3 for quit. How to know which keys refer to which signal? I know ctrl+bckspace is signal 2 and ctrl+\ is signal 3.&lt;BR /&gt;3) Any reference about trap signal?&lt;BR /&gt;&lt;BR /&gt;regards.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Jul 2004 04:14:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trap-signal/m-p/3337189#M746749</guid>
      <dc:creator>Ngoh Chean Siung</dc:creator>
      <dc:date>2004-07-21T04:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Trap signal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trap-signal/m-p/3337190#M746750</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;kill -l will give you the different signals&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Franky</description>
      <pubDate>Wed, 21 Jul 2004 04:21:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trap-signal/m-p/3337190#M746750</guid>
      <dc:creator>Franky_1</dc:creator>
      <dc:date>2004-07-21T04:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Trap signal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trap-signal/m-p/3337191#M746751</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;What is the signal for Delete button?&lt;BR /&gt;&lt;BR /&gt;regards.</description>
      <pubDate>Wed, 21 Jul 2004 04:30:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trap-signal/m-p/3337191#M746751</guid>
      <dc:creator>Ngoh Chean Siung</dc:creator>
      <dc:date>2004-07-21T04:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trap signal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trap-signal/m-p/3337192#M746752</link>
      <description>If we use trap "" 1 2 3 means, after trapping the SIGHUP, SIGINT, SIGQUIT signals, it wouldn't do nothing. you can test it a shell as,&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;test1()&lt;BR /&gt;{&lt;BR /&gt;        echo "Got signal "&lt;BR /&gt;        echo "bye to shell"&lt;BR /&gt;}&lt;BR /&gt;trap "test1" 1 2 3&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;Check with kill -1 pid of shell program or -2 or with -3&lt;BR /&gt;&lt;BR /&gt;We can not use : with the trap&lt;BR /&gt;&lt;BR /&gt; trap is used as ,&lt;BR /&gt; trap [arg] [sig ...]&lt;BR /&gt; If arg is the null string, this signal is ignored by the shell and by the commands it invokes.&lt;BR /&gt; &lt;BR /&gt; To get the default action of trap in shell as,&lt;BR /&gt; #trap&lt;BR /&gt; trap -- 'echo '\''logout root'\' EXIT&lt;BR /&gt; If you give EXIT signal it will show the message.&lt;BR /&gt;&lt;BR /&gt;References:&lt;BR /&gt; We can know the trap using man ksh page, man stty man pages.&lt;BR /&gt;&lt;BR /&gt;We can know the signal controls with stty (terminal I/O options) as,&lt;BR /&gt;# stty -a or #stty&lt;BR /&gt;&lt;BR /&gt;Use the csh shell to use delete as like linux. &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Muthukumar.&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Jul 2004 05:34:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trap-signal/m-p/3337192#M746752</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-07-21T05:34:20Z</dc:date>
    </item>
  </channel>
</rss>

