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 SUNOS
sigpause
sigblock(3UCB) SunOS/BSD Compatibility Library Functions sigblock(3UCB)
NAME
sigblock, sigmask, sigpause, sigsetmask - block signals
SYNOPSIS
/usr/ucb/cc [ flag ... ] file ...
#include <signal.h>
int sigblock(mask);
intmask;
int sigmask( signum);
int signum;
int sigpause(int mask);
int mask;
int sigsetmask( mask);
int mask;
DESCRIPTION
sigblock, sigmask, sigpause, sigsetmask - block signals
sigblock() adds the signals specified in mask to the set of signals currently being blocked from delivery. Signals are blocked if the
appropriate bit in mask is a 1; the macro sigmask is provided to construct the mask for a given signum. sigblock() returns the previous
mask. The previous mask may be restored using sigsetmask().
sigpause() assigns mask to the set of masked signals and then waits for a signal to arrive; on return the set of masked signals is
restored. mask is usually 0 to indicate that no signals are now to be blocked. sigpause() always terminates by being interrupted, returning
-1 and setting errno to EINTR.
sigsetmask() sets the current signal mask (those signals that are blocked from delivery). Signals are blocked if the corresponding bit in
mask is a 1; the macro sigmask is provided to construct the mask for a given signum.
In normal usage, a signal is blocked using sigblock(). To begin a critical section, variables modified on the occurrence of the signal are
examined to determine that there is no work to be done, and the process pauses awaiting work by using sigpause() with the mask returned by
sigblock().
It is not possible to block SIGKILL, SIGSTOP, or SIGCONT, this restriction is silently imposed by the system.
RETURN VALUES
sigblock() and sigsetmask() return the previous set of masked signals. sigpause() returns -1 and sets errno to EINTR.
SEE ALSO
kill(2), sigaction(2), signal(3UCB), sigvec(3UCB)
NOTES
Use of these interfaces should be restricted to only applications written on BSD platforms. Use of these interfaces with any of the system
libraries or in multi-thread applications is unsupported.
SunOS 5.10 19 Feb 1993 sigblock(3UCB)