Operating System - HP-UX
1833397 Members
3930 Online
110052 Solutions
New Discussion

Re: Resetting "trap" value in .profile

 
SOLVED
Go to solution
Youlette Etienne_2
Regular Advisor

Resetting "trap" value in .profile

Hello everyone,

We have the following set to lock users into a a menu when their .profile is executed. Once they select a menu option, the user is at the prompt. The menu is used to setup environment variables.

# Trap users into custom menu
trap "" 2

This disables ctrl+C. How do I reset trap to re-enable ctrl+C after the menu is executed?
If at first you don't succeed, change the rules!
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor
Solution

Re: Resetting "trap" value in .profile

Hi:

...
trap "" 2 #...disable
....
trap 2 #...enable

Regards!

...JRF...
Youlette Etienne_2
Regular Advisor

Re: Resetting "trap" value in .profile

Thanks.
If at first you don't succeed, change the rules!