<?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: disable control c on shell user program. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/disable-control-c-on-shell-user-program/m-p/2917155#M108673</link>
    <description>Plan A.&lt;BR /&gt;&lt;BR /&gt;trap '' 2&lt;BR /&gt;&lt;BR /&gt;Plan B.&lt;BR /&gt;&lt;BR /&gt;Alter intr to an impossible value, e.g. Octal 377&lt;BR /&gt;&lt;BR /&gt;stty intr '\377'&lt;BR /&gt;</description>
    <pubDate>Mon, 03 Mar 2003 15:58:18 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2003-03-03T15:58:18Z</dc:date>
    <item>
      <title>disable control c on shell user program.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disable-control-c-on-shell-user-program/m-p/2917153#M108671</link>
      <description>Hi all.&lt;BR /&gt;I have a user which shell is sh.&lt;BR /&gt;On his .profile there is a line calling to an shell script which is a menu, once the user is running that script, I don??t want he can make control-c to stop the script and go out to sh shell.&lt;BR /&gt;What is the way to do this ?.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;Juanma.</description>
      <pubDate>Mon, 03 Mar 2003 15:36:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disable-control-c-on-shell-user-program/m-p/2917153#M108671</guid>
      <dc:creator>Juan Manuel López</dc:creator>
      <dc:date>2003-03-03T15:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: disable control c on shell user program.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disable-control-c-on-shell-user-program/m-p/2917154#M108672</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Add this to your shell:&lt;BR /&gt;&lt;BR /&gt;trap '' int&lt;BR /&gt;&lt;BR /&gt;...or if you wish to offer a message with receipt of the CNTL_C:&lt;BR /&gt;&lt;BR /&gt;trap 'echo control_C has been disabled' INT&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Mar 2003 15:53:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disable-control-c-on-shell-user-program/m-p/2917154#M108672</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-03-03T15:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: disable control c on shell user program.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disable-control-c-on-shell-user-program/m-p/2917155#M108673</link>
      <description>Plan A.&lt;BR /&gt;&lt;BR /&gt;trap '' 2&lt;BR /&gt;&lt;BR /&gt;Plan B.&lt;BR /&gt;&lt;BR /&gt;Alter intr to an impossible value, e.g. Octal 377&lt;BR /&gt;&lt;BR /&gt;stty intr '\377'&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Mar 2003 15:58:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disable-control-c-on-shell-user-program/m-p/2917155#M108673</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-03-03T15:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: disable control c on shell user program.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disable-control-c-on-shell-user-program/m-p/2917156#M108674</link>
      <description>I don't know if this will help or not. But years ago I used to have users like that and I simply put "exit" as the last line in the .profile file. Something like this:&lt;BR /&gt;&lt;BR /&gt;#start of .profile&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;#call the menu&lt;BR /&gt;/usr/bin/your_menu&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;End of .profile&lt;BR /&gt;&lt;BR /&gt;When your_menu is terminated, either on purpose or by any key stroke, the next command in .profile is an exit and it forces the user back to a logon screen.&lt;BR /&gt;&lt;BR /&gt;Good luck.</description>
      <pubDate>Mon, 03 Mar 2003 18:38:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disable-control-c-on-shell-user-program/m-p/2917156#M108674</guid>
      <dc:creator>John Dvorchak</dc:creator>
      <dc:date>2003-03-03T18:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: disable control c on shell user program.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disable-control-c-on-shell-user-program/m-p/2917157#M108675</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Other possible way is the following:&lt;BR /&gt;&lt;BR /&gt;#Start of menu script&lt;BR /&gt;stty intr ''&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;stty intr '^C' #Restore Ctrl-C feature&lt;BR /&gt;#End of menu script&lt;BR /&gt;&lt;BR /&gt;Rgds.&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Mar 2003 19:45:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disable-control-c-on-shell-user-program/m-p/2917157#M108675</guid>
      <dc:creator>Jose Mosquera</dc:creator>
      <dc:date>2003-03-03T19:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: disable control c on shell user program.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disable-control-c-on-shell-user-program/m-p/2917158#M108676</link>
      <description>Thanks to everyone for your help.&lt;BR /&gt;Special Thanks to Clay, Your plan B works fine.&lt;BR /&gt;Thanks again.&lt;BR /&gt;&lt;BR /&gt;Juanma.</description>
      <pubDate>Tue, 04 Mar 2003 08:40:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disable-control-c-on-shell-user-program/m-p/2917158#M108676</guid>
      <dc:creator>Juan Manuel López</dc:creator>
      <dc:date>2003-03-04T08:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: disable control c on shell user program.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disable-control-c-on-shell-user-program/m-p/2917159#M108677</link>
      <description>have you tested the above trap(s) against CTRL \?&lt;BR /&gt;&lt;BR /&gt;You may find a better way is to run the menu as the users shell. Ensure that you reference the .profile and /etc/profile from within the menu (shell) and include the menu (shell) in /etc/shells if this file exists on your system.&lt;BR /&gt;&lt;BR /&gt;When the login menu (shell) exits, there is nowhere else for the user to go.</description>
      <pubDate>Tue, 04 Mar 2003 12:50:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disable-control-c-on-shell-user-program/m-p/2917159#M108677</guid>
      <dc:creator>Kevin Tuitt</dc:creator>
      <dc:date>2003-03-04T12:50:49Z</dc:date>
    </item>
  </channel>
</rss>

