- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Cntrl-C problem
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-2002 07:07 AM
02-21-2002 07:07 AM
Cntrl-C problem
% cat .profile
DT=${DT-""}
if [ ! "$DT" ] ; then
eval ` tset -s -Q `
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
fi
dtterm -e nice tail -f /var/adm/syslog/syslog.log &
This works, but when I have to press Ctrl-C the dtterm with the running 'tail -f
...' is closed. That's due to setting intr to "^C".
How do I manage to have an running "tail -f" - dtterm although I press Ctrl-C?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2002 07:14 AM
02-21-2002 07:14 AM
Re: Cntrl-C problem
you can trap signals sent to processes:
trap 'action' signals_to_trap
this "catches" the signals and they don't reach the process.
example:
trap '' 2
ctrl-c sends the signal interrupt, which has the signal number 2. So the signal doesn't reach the process. The only signal which cannot be catched is the signal 9 (kill). For information about which signal has which code number use:
kill -l
--> shows you the defined signals with code numbers
Allways stay on the bright side of life!
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2002 07:15 AM
02-21-2002 07:15 AM
Re: Cntrl-C problem
the command 'nohup' before tail -f ........
may help you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2002 07:16 AM
02-21-2002 07:16 AM
Re: Cntrl-C problem
#!/usr/bin/sh
trap $SHELL 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
tail -f /tmp/filelog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2002 07:18 AM
02-21-2002 07:18 AM
Re: Cntrl-C problem
From previous posting ..
Execute the script by entering the 'dtterm -e file_name' command.