HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- trap interrupts for 11.31?
Operating System - HP-UX
1833968
Members
2112
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2009 02:39 PM
06-05-2009 02:39 PM
trap interrupts for 11.31?
the following entry worked for a captured user environment on 11.11, but not 11.31:
trap 'exit' 0 1 2 3 13 14 15 24
I checked the default /etc/profile on both boxes...both have the same entries:
# grep trap /etc/profile
trap "" 1 2 3
trap "echo logout" 0
trap 1 2 3
anyone encounter a fix for this?
thanks,
manuel
trap 'exit' 0 1 2 3 13 14 15 24
I checked the default /etc/profile on both boxes...both have the same entries:
# grep trap /etc/profile
trap "" 1 2 3
trap "echo logout" 0
trap 1 2 3
anyone encounter a fix for this?
thanks,
manuel
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2009 05:59 PM
06-05-2009 05:59 PM
Re: trap interrupts for 11.31?
What are you asking? What do you mean by "not work"? If you need those extra signals, you need to modify your own ~/.profile.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2009 06:37 PM
06-05-2009 06:37 PM
Re: trap interrupts for 11.31?
> # grep trap /etc/profile
> trap "" 1 2 3
> trap "echo logout" 0
> trap 1 2 3
trap in association with /etc/profile probably means you are referring to shell behavior. What shell are you running? What fix are you looking for?
OK, here's what /etc/profile is doing:
trap "" 1 2 3
which means: do nothing (ignore) signals 1,2 and 3 (SIGHUP, SIGINT, SIGQUIT respectively) from now on, that is, until the trap settings are changed. /etc/profile will run even if the connection is broken (in the old days, the modem would hang up -- HUP) as an example.
trap "echo logout" 0
When this script exits normally (signal 0), print the word: logout
trap 1 2 3
Return to the default action for signals 1, 2, and 3. So if a kill -3 is seen by /etc/profile, the shell will core dump.
=========================
trap 'exit' 0 1 2 3 13 14 15 24
In this shell script, all the signals (aka, kill options) 0,1,2,3,13,14,15,24 with simply exit. After this trap is run, kill -3 will no longer core dump the shell.
"...not 11.31..."
What does "not" mean? Do you get an error? a core dump? a kernel panic? smoke pouring out of the keyboard?
Bill Hassell, sysadmin
> trap "" 1 2 3
> trap "echo logout" 0
> trap 1 2 3
trap in association with /etc/profile probably means you are referring to shell behavior. What shell are you running? What fix are you looking for?
OK, here's what /etc/profile is doing:
trap "" 1 2 3
which means: do nothing (ignore) signals 1,2 and 3 (SIGHUP, SIGINT, SIGQUIT respectively) from now on, that is, until the trap settings are changed. /etc/profile will run even if the connection is broken (in the old days, the modem would hang up -- HUP) as an example.
trap "echo logout" 0
When this script exits normally (signal 0), print the word: logout
trap 1 2 3
Return to the default action for signals 1, 2, and 3. So if a kill -3 is seen by /etc/profile, the shell will core dump.
=========================
trap 'exit' 0 1 2 3 13 14 15 24
In this shell script, all the signals (aka, kill options) 0,1,2,3,13,14,15,24 with simply exit. After this trap is run, kill -3 will no longer core dump the shell.
"...not 11.31..."
What does "not" mean? Do you get an error? a core dump? a kernel panic? smoke pouring out of the keyboard?
Bill Hassell, sysadmin
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP