Operating System - HP-UX
1832957 Members
2805 Online
110048 Solutions
New Discussion

Re: Signals handling in tcsh

 
Alex Lavrov
Regular Advisor

Signals handling in tcsh

Hey,
I'm looking for command, that can trap system signals, like TRAP in sh.

Failed to find something in google.

thnx
3 REPLIES 3
Michael Steele_2
Honored Contributor

Re: Signals handling in tcsh

Try 'tusc'. For example:

tusc -a PID

http://hpux.asknet.de/hppd/hpux/Sysadmin/tusc-7.3/
Support Fatherhood - Stop Family Law
Alex Lavrov
Regular Advisor

Re: Signals handling in tcsh

I want to use it in the script, to trap signals. So, tusc is not what I need ...
something like TRAP in sh ...
Huc_1
Honored Contributor

Re: Signals handling in tcsh

I do not use tcsh myself, but in a doc I found that the command onintr "On interrupt" is the same as bash's trap 2 and trap "" 2

in a script

onintr rats # branch to label rats:
-
-
-
rats: # on interrupt do
onintr - # cast away additional interrupt
rm tmp_script.file # cleanup
-
-
-
exit 2 # exit error 2 status

that Is all I can deliver I am afraid.

Hope it will meet some of your needs.

Jean-Pierre
Smile I will feel the difference