- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: What is the signal for click x button?
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
02-21-2006 01:12 PM
02-21-2006 01:12 PM
What is the signal for click x button?
I am using tera term and telnet emulation to connect to the HP server. May I know what is the signal for clicking x button which is located on top?
Because we need to trap this termination signal in order to prevent user login session still alive even user already exit the emulation.
regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 01:22 PM
02-21-2006 01:22 PM
Re: What is the signal for click x button?
Now if you are saying that the user session is still running after the telnet window is closed, that means that the SIHUP trap is not set. To verify this, login as a user, then at a shell prompt, type the command:
trap
It will show you the signals that are trapped. A properly setup HP-UX login will have the hangup signal enabled and if it occurs (because the telnet session is terminated abnormally), your application and the login session will be signaled to terminate.
If you see that trap is not set, you can re-enable traps by typing:
trap 1 2 3
which restores normal behavior, then run your applcation and close the window. Your login session should terminate normally.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 02:06 PM
02-21-2006 02:06 PM
Re: What is the signal for click x button?
Allows me to explain to you in more details.
Basically after my users login to server, they will access a main menu (.mnu) which used to access informix application. All the users .profile content is only has 1 line which is 'exit'. So, they will follow the parameters set in /etc/profile.
Before server upgrade from HP10 to HP11, everything is working fine. They are following the profile (attached as profile_org). In this file, I hv highlight the lines as blue colour. These lines was disabled after server upgrade. (attached as profile_now). You may use wordpad to open these files.
1) By using profile_org
The problem is after user access the option in .mnu, if the user terminate it by clicking x button, the user session still alive (can track by using w command). The process that the user running is the statements that after 'if [ -s $HOME/.mnu ]'. When I use w command to check, what I can see is the user session is still there. The JCPU and PCPU will keep on increasing. Below is the output if using w command:
# w | grep ncs
root pts/ty 10:51am grep ncs
ncs pts/tE 10:54am 2 2 -sh
# ps -t pts/tE
PID TTY TIME COMMAND
26474 pts/tE 0:03 sh
26473 pts/tE 0:00 telnetd
2) By using profile_now,
Everything is ok IF without any trap tracking and disable the while loop for .mnu. The user session will disappear even user click x button.
For my requirement, I want to disable trap signal 1 2 3 and enable it at the end of the profile. Is there any script that we can put inside the profile to kill sh id which is after telnetd IF user click x button?
regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 02:09 PM
02-21-2006 02:09 PM
Re: What is the signal for click x button?
Attached is the files for profile and .mnu.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 02:55 PM
02-21-2006 02:55 PM
Re: What is the signal for click x button?
trap 'function to be executed on getting signal' 1 2 3
See trap man page.
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 01:04 AM
02-22-2006 01:04 AM
Re: What is the signal for click x button?
trap : 1 2 3
which is the same as: trap "" 1 2 3 and means: if signals for SIGHUP, SIGINT or SIGQUIT are seen, do nothing (ignore). Then down at the bottom of the profile, you'll see this:
# Leave defaults in user environment.
# trap 1 2 3
Oops (I did the same thing a long time ago), someone saw what appears to be the same statement at the beginning of your script, so it was commented out. Just remove the comment and your profile will work as you desire. The traps are disabled at the beginning, then re-enabled before the menu program starts.
Bill Hassell, sysadmin