<?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: Re-enabling ctrl-C trap after returning from menu.. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/re-enabling-ctrl-c-trap-after-returning-from-menu/m-p/3004815#M127248</link>
    <description>Your outer level menu may need to assert a new trap statement BUT it's very possible that the application has reset the interrupt key. &lt;BR /&gt;&lt;BR /&gt;When you get in your situation, issue a stty -a and note the intr setting. Sometimes, a programmer will set intr to an impossible value e.g. \377 rather than ignoring an intterupt. This is especially true when Ctrl-C or DEL is used for something else. If intr has been reset then you can issue a stty of your own to reset it. The best method would be to do an initial stty to get the value of the interrupt key and then reset to that value after each return from the applications.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 23 Jun 2003 15:18:28 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2003-06-23T15:18:28Z</dc:date>
    <item>
      <title>Re-enabling ctrl-C trap after returning from menu..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/re-enabling-ctrl-c-trap-after-returning-from-menu/m-p/3004814#M127247</link>
      <description>We have operation menus that disable Control-C while the user is in the menus.  The initial menu is an admin user account that specifically executes the menu and doesn't provide a shell prompt.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Here's my problem.  Whenever I su or login using the admin menu and then return to the previous shell session that I was in, Control-C no longer works. I then have to log out of the shell session that I su's or logged in from.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;1 - Log in as root&lt;BR /&gt;2 - su - hpadmin  (runs the admin menu under the hpadmin account)&lt;BR /&gt;3 - Exit from menu (Control-C no longer works now that I'm back as root)&lt;BR /&gt;&lt;BR /&gt;I do a ping test after returning from the admin menus and I can't interrupt the pings.  To get control-c to work again I have to exit root.&lt;BR /&gt;&lt;BR /&gt;jack...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 23 Jun 2003 15:12:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/re-enabling-ctrl-c-trap-after-returning-from-menu/m-p/3004814#M127247</guid>
      <dc:creator>Jack C. Mahaffey</dc:creator>
      <dc:date>2003-06-23T15:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Re-enabling ctrl-C trap after returning from menu..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/re-enabling-ctrl-c-trap-after-returning-from-menu/m-p/3004815#M127248</link>
      <description>Your outer level menu may need to assert a new trap statement BUT it's very possible that the application has reset the interrupt key. &lt;BR /&gt;&lt;BR /&gt;When you get in your situation, issue a stty -a and note the intr setting. Sometimes, a programmer will set intr to an impossible value e.g. \377 rather than ignoring an intterupt. This is especially true when Ctrl-C or DEL is used for something else. If intr has been reset then you can issue a stty of your own to reset it. The best method would be to do an initial stty to get the value of the interrupt key and then reset to that value after each return from the applications.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 23 Jun 2003 15:18:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/re-enabling-ctrl-c-trap-after-returning-from-menu/m-p/3004815#M127248</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-06-23T15:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Re-enabling ctrl-C trap after returning from menu..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/re-enabling-ctrl-c-trap-after-returning-from-menu/m-p/3004816#M127249</link>
      <description>Hi Jack:&lt;BR /&gt;&lt;BR /&gt;You can disable the trap with 'trap - INT' :&lt;BR /&gt;&lt;BR /&gt;#!usr/bin/sh&lt;BR /&gt;trap '' INT&lt;BR /&gt;echo "CTRL_C disabled"&lt;BR /&gt;read OK&lt;BR /&gt;trap - INT&lt;BR /&gt;echo "CTRL_C enabled"&lt;BR /&gt;read OK&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;Regrards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 23 Jun 2003 15:19:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/re-enabling-ctrl-c-trap-after-returning-from-menu/m-p/3004816#M127249</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-06-23T15:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Re-enabling ctrl-C trap after returning from menu..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/re-enabling-ctrl-c-trap-after-returning-from-menu/m-p/3004817#M127250</link>
      <description>Hi again:&lt;BR /&gt;&lt;BR /&gt;In case you think my theory of setting the interrupt key sounds hokey, note that the interrupt key is defined for the port NOT for the process. Once set, it remains until a subsequent ioctl() or stty command.&lt;BR /&gt;</description>
      <pubDate>Mon, 23 Jun 2003 15:20:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/re-enabling-ctrl-c-trap-after-returning-from-menu/m-p/3004817#M127250</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-06-23T15:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Re-enabling ctrl-C trap after returning from menu..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/re-enabling-ctrl-c-trap-after-returning-from-menu/m-p/3004818#M127251</link>
      <description>Thanks all.  &lt;BR /&gt;&lt;BR /&gt;Clay, your right on the money.&lt;BR /&gt;&lt;BR /&gt;Somehow, somewhere the intr setting gets changed to DEL from ^C.  Looks like the quit and erase settings get changed also.&lt;BR /&gt;&lt;BR /&gt;Here's diff output from comparing the settings before and after running the menus.&lt;BR /&gt;&lt;BR /&gt;[4987]root@cordayop:/tmp # diff stty.before stty.after&lt;BR /&gt;3,5c3,5&lt;BR /&gt;&amp;lt; min = 1; time = 0; &lt;BR /&gt;&amp;lt; intr = ^C; quit &lt;UNDEF&gt;; erase = ^H; kill = ^U&lt;BR /&gt;&amp;lt; eof = ^D; eol = ^@; eol2 &lt;UNDEF&gt;; swtch &lt;UNDEF&gt;&lt;BR /&gt;---&lt;BR /&gt;&amp;gt; min = 4; time = 0; &lt;BR /&gt;&amp;gt; intr = DEL; quit = ^\; erase = #; kill = @&lt;BR /&gt;&amp;gt; eof = ^D; eol = ^@; eol2 &lt;UNDEF&gt;; swtch = ^@&lt;BR /&gt;9,11c9,11&lt;BR /&gt;&amp;lt; -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc &lt;BR /&gt;&amp;lt; ixon ixany ixoff -imaxbel -rtsxoff -ctsxon -ienqak &lt;BR /&gt;&amp;lt; isig icanon -iexten -xcase echo echoe echok -echonl -noflsh &lt;BR /&gt;---&lt;BR /&gt;&amp;gt; -ignbrk brkint ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc &lt;BR /&gt;&amp;gt; ixon ixany -ixoff -imaxbel -rtsxoff -ctsxon -ienqak &lt;BR /&gt;&amp;gt; isig icanon -iexten -xcase echo -echoe echok -echonl -noflsh &lt;BR /&gt;&lt;/UNDEF&gt;&lt;/UNDEF&gt;&lt;/UNDEF&gt;&lt;/UNDEF&gt;</description>
      <pubDate>Mon, 23 Jun 2003 16:46:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/re-enabling-ctrl-c-trap-after-returning-from-menu/m-p/3004818#M127251</guid>
      <dc:creator>Jack C. Mahaffey</dc:creator>
      <dc:date>2003-06-23T16:46:47Z</dc:date>
    </item>
  </channel>
</rss>

