Here is something I had before, which was to ignore control c. How do i unblock a signal? And how is this code? I changed the handler to work with my catcher function now.
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)
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)
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)
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)
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)
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)
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)
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)
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)
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 CENTOS
bsd_signal
BSD_SIGNAL(3P) POSIX Programmer's Manual BSD_SIGNAL(3P)PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond-
ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
NAME
bsd_signal - simplified signal facilities
SYNOPSIS
#include <signal.h>
void (*bsd_signal(int sig, void (*func)(int)))(int);
DESCRIPTION
The bsd_signal() function provides a partially compatible interface for programs written to historical system interfaces (see APPLICATION
USAGE).
The function call bsd_signal(sig, func) shall be equivalent to the following:
void (*bsd_signal(int sig, void (*func)(int)))(int)
{
struct sigaction act, oact;
act.sa_handler = func;
act.sa_flags = SA_RESTART;
sigemptyset(&act.sa_mask);
sigaddset(&act.sa_mask, sig);
if (sigaction(sig, &act, &oact) == -1)
return(SIG_ERR);
return(oact.sa_handler);
}
The handler function should be declared:
void handler(int sig);
where sig is the signal number. The behavior is undefined if func is a function that takes more than one argument, or an argument of a dif-
ferent type.
RETURN VALUE
Upon successful completion, bsd_signal() shall return the previous action for sig. Otherwise, SIG_ERR shall be returned and errno shall be
set to indicate the error.
ERRORS
Refer to sigaction().
The following sections are informative.
EXAMPLES
None.
APPLICATION USAGE
This function is a direct replacement for the BSD signal() function for simple applications that are installing a single-argument signal
handler function. If a BSD signal handler function is being installed that expects more than one argument, the application has to be modi-
fied to use sigaction(). The bsd_signal() function differs from signal() in that the SA_RESTART flag is set and the SA_RESETHAND is clear
when bsd_signal() is used. The state of these flags is not specified for signal().
It is recommended that new applications use the sigaction() function.
RATIONALE
None.
FUTURE DIRECTIONS
None.
SEE ALSO
sigaction(), sigaddset(), sigemptyset(), signal(), the Base Definitions volume of IEEE Std 1003.1-2001, <signal.h>
COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol-
ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE
and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained
online at http://www.opengroup.org/unix/online.html .
IEEE /The Open Group 2003 BSD_SIGNAL(3P)