11-27-2008
Trapped Signal HUP
We encountered an issue in our project while using the Interix UNIX (SFU 3.5) and explained our query below. We would be happy if anybody helps us to troubleshoot the problem J
In our code the trapping signal for all signals like HUP, INT, QUIT, ILL, TRAP, ABRT, EXCEPT, etc., is initialized in the main script. This main script calls the various executable codes and shell scripts which are mostly used to connect the ACR data base and transfer the files from local machine to remote machine.
While execution of our code sometimes we received message like Trapped Signal HUP and sometimes it was executing fine. Could any of you please explain us, why we have received message Trapped Signal HUP in some occurrences and not in some other times for the same executables?
For example,
trap_function()
{
SIGNAL=$1
echo Trapped signal $SIGNAL >> $HOME/Trap.log
trap - $SIGNAL
kill -$SIGNAL $MYPID
}
for SIGNAME in \
HUP \
INT \
;;;;
XCPU \
XFSZ
do
trap "trap_function $SIGNAME" $SIGNAME
done
MYPID=$$
./script1.sh &
./script2.sg &
./script3.sh &
........
......
./exe1 &
.....
./script30.sh &
./exe5 &
Note:All log files which sizes are greater than 200kb will be taken backup.
Last edited by RAMESHPRABUDASS; 11-27-2008 at 08:36 AM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am curious about HUP..... kill -HUP pid
What exactly does it do?? Does it stop the process and restart it from the beginning or from where it stopped? Thanks (6 Replies)
Discussion started by: jwbrown
6 Replies
2. UNIX for Dummies Questions & Answers
solaris can't support pkill command:( (2 Replies)
Discussion started by: cloudsmell
2 Replies
3. Linux
Hi All,
I modified /etc/syslog.conf and execute kill -HUP syslogd_PID. There's nothing changes on the PID when I did ps -ef|grep syslogd. It's the same. Do you think it restarted the process of syslogd?
Thanks in advance. (3 Replies)
Discussion started by: itik
3 Replies
4. Shell Programming and Scripting
Hi all
I have Master script, Main script ,and 4 Child script.
Master.sh
#!/bin/bash
/export/home/user/Main.shMain.sh
#!/bin/bash
/export/home/user/Child1.sh &
/export/home/user/Child2.sh &
/export/home/user/Child3.sh &
/export/home/user/Child4.sh &I run only Master.sh script... (1 Reply)
Discussion started by: almanto
1 Replies
5. UNIX for Dummies Questions & Answers
Hello - I need to know the detail of HUP and SEGV.
I know HUP is Hangup and can be use to kill a Unix login session remotely by sending a hangup signal to the process running the login session.
Could someone tell me in detail prupose of HUP and SEGV (segmentation violation)?
I need to... (1 Reply)
Discussion started by: namasteall2000
1 Replies
6. Shell Programming and Scripting
Hi
Is there any way to find out in a single step ( command) the step where the pipe command failed when using multiple commands using pipe .
eg : ll *.tar | grep dec | grep december.tar
the first step is listing all tar files . Second step constitutes piping that data and
doing grep... (5 Replies)
Discussion started by: ultimatix
5 Replies
7. Solaris
Hi,
I'm trying to provide "/usr/bin/kill -HUP" command to one of the user using sudo file. I have configured sudo as following:
$cat /etc/sudoers
User_Alias AA=conadmin
Cmnd_Alias KILL1=/usr/bin/kill -HUPAA ALL=NOPASSWD:KILL1
When I login as the user and execute 'sudo -l' command, it... (2 Replies)
Discussion started by: mohzub
2 Replies
8. UNIX for Advanced & Expert Users
Hi
In my program I have already used both SIGUSR1 SIGUSR2 user signals.
I need another one.
How can I do that?
Thank you
Naama (1 Reply)
Discussion started by: naamabm
1 Replies
9. UNIX for Dummies Questions & Answers
I have this code that doesnt do what it is suppose to do. It should block signal that I send while process is running. I press control+z while this process is running and it should be blocked but it isnt. When i press control+z it gives me this....
+ Stopped
When I change SIGTSP into SIGINT then... (5 Replies)
Discussion started by: joker40
5 Replies
10. Shell Programming and Scripting
Greetings. This is my first post in this forum; I hope y'all find it useful. One caveat: "Concise" is my middle name. NOT! :D
I am almost done with a shell script that runs as a daemon. It monitors a message log that is frequently written to by a database server but it it works my client will... (2 Replies)
Discussion started by: jakesalomon
2 Replies