11-09-2007
Hmmm, I was playing around with a linux firewall and when I closed it down I noticed while the firewall was shutting down, it said, "sending sigkill" "sending sigterm". Thats basically where I got the idea.
Ill have to look in to the unblocking, and the posix. I didnt realize signals where blocked. I thought when i declare in int main to not use default action that would mean the signals have to go through my code.
anyone else feel free to offer opinions.
thanks,
norelco55
10 More Discussions You Might Find Interesting
1. Programming
Hi all,
I need some urgent help.
we are using Dynix/ptx V4.5 on i386, have several processes and instances are running on the box round the clock.we increased the processes recently.
We have coded to handle the signals in our programs.
Recently, we noticed most of our processes are... (2 Replies)
Discussion started by: reddyb
2 Replies
2. Shell Programming and Scripting
Hi Gurus,
I am executing my Datastage jobs on UNIX operating System. While running the jobs i am getting the following error:
main_program: Unexpected termination by Unix signal 9(SIGKILL)
Can any one please let me know what are the possible situations where this SIGKILL will arrise?
... (9 Replies)
Discussion started by: choppas
9 Replies
3. Solaris
Hiiii..... Every one......
I am using /etc/issue file to display Pre-login Message
on my system, installed with SOLARIS-9.
I am getting this Message in White fonts having Black
background ( Colour of the Screen).....
So, is there ... (2 Replies)
Discussion started by: prashantshukla
2 Replies
4. Shell Programming and Scripting
Hi all
Geting this error while trying to print message as :
./logfunc: print: bad file unit number
heres what i m trying to do :
log_date="$(date '+%d/%m/%Y %H:%M:%S')"
log_type="Message"
print "${log_date}: ${log_type}"
print -u3 "${log_date}: ${log_type}"
this error is due to... (3 Replies)
Discussion started by: Navatha
3 Replies
5. Shell Programming and Scripting
Hi Friends,
I am using HP-UNIX(ksh). I want to print a message at specific line on the prompt screen. For Example:
for num in 1 10 3 145
do
echo $num // need to print this on the same line for each number
sleep 2
done
Actual Output:
==========
1
10
3
145
Expected Output:... (5 Replies)
Discussion started by: Niroj
5 Replies
6. Solaris
Dear All,
I have machine with SunOS 5.10 Generic_138888-01 sun4v sparc SUNW,SPARC-Enterprise-T5120. Yesterday there is something at dmesg command :
May 25 18:09:02 cacao_launcher: Timeout occured on heartbeat channel, cleanup engaged
May 25 18:09:07 cacao_launcher: watchdog : warning,... (0 Replies)
Discussion started by: mbah_jiman
0 Replies
7. Shell Programming and Scripting
Dear All
We have JBOSS server running on Linux we need to track Graceful Shutdown(SIGTERM) and Forceful Shutdown(SIGKILL) timestamp and write it into one file, I am new to UNIX Signal processing if is it possible how to detect it?
We generally do
$kill PID For Graceful... (5 Replies)
Discussion started by: mnmonu
5 Replies
8. Shell Programming and Scripting
Which is sent to a terminal when it closes? SIGKILL? Reason I ask is I have a script I want to run in the background, but want it to run even if the terminal window is closed. Or, I'd like it to background itself if the terminal is closed but not if its running in an open window. I will learn how... (5 Replies)
Discussion started by: DC Slick
5 Replies
9. UNIX for Advanced & Expert Users
I want to connect to oracle database from solaris...
After that i will drop and create a no.of tables.One of the table example is as below.
sqlplus -s usrname/password@dbname << SQL >> $logfile 2>&1
echo " dropping the table1" | tee logfile
DROP TABLE Table1
echo "creating the table1" |... (1 Reply)
Discussion started by: millan
1 Replies
10. Shell Programming and Scripting
Hi,
I am new to shell scripting and got a task to complete.
Task is : we have a log file where in i need to traverse through the whole file to check the string "Person Type missing in message" and after that i need to get EMPLID=xxxxxx from the file and print details in a different file.
... (1 Reply)
Discussion started by: suren424
1 Replies
LEARN ABOUT REDHAT
sigmask
SIGBLOCK(2) Linux Programmer's Manual SIGBLOCK(2)
NAME
sigblock, siggetmask, sigsetmask, sigmask - manipulate the signal mask
SYNOPSIS
#include <signal.h>
int sigblock(int mask);
int siggetmask(void);
int sigsetmask(int mask);
int sigmask(int signum);
DESCRIPTION
This interface is made obsolete by sigprocmask(2).
The sigblock system call adds the signals specified in mask to the set of signals currently being blocked from delivery.
The sigsetmask system call replaces the set of blocked signals totally with a new set specified in mask. Signals are blocked if the corre-
sponding bit in mask is a 1.
The current set of blocked signals can be obtained using siggetmask.
The sigmask macro is provided to construct the mask for a given signum.
RETURN VALUE
siggetmask returns the current set of masked signals.
sigsetmask and sigblock return the previous set of masked signals.
NOTES
Prototypes for these functions are only available if _BSD_SOURCE is defined before the inclusion of any system header file.
It is not possible to block SIGKILL or SIGSTOP - this restriction is silently imposed by the system.
CONFORMING TO
4.4BSD. These function calls appeared in BSD 4.3 and are deprecated. Use the POSIX signal facilities for new programs.
SEE ALSO
kill(2), sigprocmask(2), signal(7)
Linux 1.3 1995-08-31 SIGBLOCK(2)