<?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: how to remove trap ( unset ) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-remove-trap-unset/m-p/5231030#M679776</link>
    <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;I'm sorry, I think I understand what you mean by "unset".&lt;BR /&gt;&lt;BR /&gt;To restore a trap (signal) to it's original (DEFAULT) value do:&lt;BR /&gt;&lt;BR /&gt;# trap - INT&lt;BR /&gt;&lt;BR /&gt;If, however, you do:&lt;BR /&gt;&lt;BR /&gt;# trap '' INT&lt;BR /&gt;&lt;BR /&gt;...this is equivalent to an IGNORE action.&lt;BR /&gt;&lt;BR /&gt;This script snippet will help you see the various actions:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;trap 'echo sorry' INT QUIT HUP KILL&lt;BR /&gt;trap&lt;BR /&gt;echo "I'm safe"&lt;BR /&gt;read REPLY&lt;BR /&gt;trap - INT&lt;BR /&gt;trap - QUIT&lt;BR /&gt;echo "I'm no longer immune"&lt;BR /&gt;read REPLY&lt;BR /&gt;trap&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;...run the above and attempt a CTL_C to break the script after the first and then after the second read().&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Thu, 18 Mar 2010 22:48:33 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2010-03-18T22:48:33Z</dc:date>
    <item>
      <title>how to remove trap ( unset )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-remove-trap-unset/m-p/5231026#M679772</link>
      <description>how  unset the trap</description>
      <pubDate>Thu, 18 Mar 2010 21:56:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-remove-trap-unset/m-p/5231026#M679772</guid>
      <dc:creator>blu.karthi</dc:creator>
      <dc:date>2010-03-18T21:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to remove trap ( unset )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-remove-trap-unset/m-p/5231027#M679773</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;If you mean a shell 'trap' then:&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;trap 'echo sorry' INT&lt;BR /&gt;...&lt;BR /&gt;trap '' INT&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Mar 2010 22:08:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-remove-trap-unset/m-p/5231027#M679773</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-03-18T22:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to remove trap ( unset )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-remove-trap-unset/m-p/5231028#M679774</link>
      <description>hi, thank for the response... my requriment is to remove all trap..... there should not be any trap...</description>
      <pubDate>Thu, 18 Mar 2010 22:15:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-remove-trap-unset/m-p/5231028#M679774</guid>
      <dc:creator>blu.karthi</dc:creator>
      <dc:date>2010-03-18T22:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to remove trap ( unset )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-remove-trap-unset/m-p/5231029#M679775</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt;  my requriment is to remove all trap..... there should not be any trap...&lt;BR /&gt;&lt;BR /&gt;Again, I assume that this whole discussion relates to the shell.  Thus if you had set a 'trap' for (example) SIGHUP, SIGINT, SIGQUIT and SIGTERM you could reset (restore) their default action by doing:&lt;BR /&gt;&lt;BR /&gt;# trap '' HUP INT QUIT TERM&lt;BR /&gt;&lt;BR /&gt;You can see what's set in your script, you can do:&lt;BR /&gt;&lt;BR /&gt;# trap&lt;BR /&gt;&lt;BR /&gt;...which will simply print the handler associated with each set trap.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 18 Mar 2010 22:27:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-remove-trap-unset/m-p/5231029#M679775</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-03-18T22:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to remove trap ( unset )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-remove-trap-unset/m-p/5231030#M679776</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;I'm sorry, I think I understand what you mean by "unset".&lt;BR /&gt;&lt;BR /&gt;To restore a trap (signal) to it's original (DEFAULT) value do:&lt;BR /&gt;&lt;BR /&gt;# trap - INT&lt;BR /&gt;&lt;BR /&gt;If, however, you do:&lt;BR /&gt;&lt;BR /&gt;# trap '' INT&lt;BR /&gt;&lt;BR /&gt;...this is equivalent to an IGNORE action.&lt;BR /&gt;&lt;BR /&gt;This script snippet will help you see the various actions:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;trap 'echo sorry' INT QUIT HUP KILL&lt;BR /&gt;trap&lt;BR /&gt;echo "I'm safe"&lt;BR /&gt;read REPLY&lt;BR /&gt;trap - INT&lt;BR /&gt;trap - QUIT&lt;BR /&gt;echo "I'm no longer immune"&lt;BR /&gt;read REPLY&lt;BR /&gt;trap&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;...run the above and attempt a CTL_C to break the script after the first and then after the second read().&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 18 Mar 2010 22:48:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-remove-trap-unset/m-p/5231030#M679776</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-03-18T22:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to remove trap ( unset )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-remove-trap-unset/m-p/5231031#M679777</link>
      <description>thanks.....</description>
      <pubDate>Thu, 18 Mar 2010 23:24:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-remove-trap-unset/m-p/5231031#M679777</guid>
      <dc:creator>blu.karthi</dc:creator>
      <dc:date>2010-03-18T23:24:46Z</dc:date>
    </item>
  </channel>
</rss>

