Sponsored Content
Full Discussion: Signal Names
Top Forums Programming Signal Names Post 57587 by A452917 on Tuesday 2nd of November 2004 04:01:09 PM
Old 11-02-2004
There is nothing such as 'name of the signal'. I guess you are refferring to the defined macros for the signal numbers.

#define SIGHUP 1 /* hangup */
#define SIGINT 2 /* interrupt (rubout) */
#define SIGQUIT 3 /* quit (ASCII FS) */

There are couple of ways to find out the description of the caught signal. One can call below functions to get the description:

void psignal(int sig, const char *s);
void psiginfo(siginfo_t *pinfo, char *s);

These functions are defined in <siginfo.h>

Coming to your second question:

As per my understanding, there is no generic function to catch all the signals. It is necessary to specify the signal you want handle.

Hope this helps.

Last edited by A452917; 11-02-2004 at 06:48 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Alarm signal

Hi, when I execute a script on unix AIX, I've got an error message: "Execution: 85328 Signal d'alarme". If I edit this file with "vi", I ve got the same error after a while (about 1 minute). If I try with another user I still have the problem. But if I rename this file, no problem. My... (5 Replies)
Discussion started by: cgsteph
5 Replies

2. UNIX for Advanced & Expert Users

Kill Signal

Hello, I'm doing a project of OS simulation (Process Scheduling, to be very specific). Can anyone, please, explain what exactly happens in the background when we see "Sending all processes the KILL signal...........". How is it sent to each process? Is it that something like a boolean is stored... (3 Replies)
Discussion started by: ameya
3 Replies

3. Programming

Signal Problem

I am using the signal function, and passing it a function named quit procedure...I get the following warning.... passing arg2 of signal from incompatible pointer type... void quit_procedure(void); //this is the way i define my prototype... signal(SIGINT, quit_procedure); Please guide... (5 Replies)
Discussion started by: jacques83
5 Replies

4. Programming

Signal catching

Hi! I want to catch all signals that my program receives print their name and then execute the default handler. Can you help me on that? I've tried the following code: #include <stdio.h> #include <unistd.h> #include <signal.h> void (*hnd)(int i); char signals = { "SIGHUP",... (7 Replies)
Discussion started by: dark_knight
7 Replies

5. Shell Programming and Scripting

Killed by signal 15.

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

6. Programming

RLIMIT_STACK signal's

I'am expecting a signal, but no signal is received when the stack-size reaches 10 bytes. Here in this code i'am setting rlim_cur=10bytes. To be more precise, when it reaches 10 bytes the process must receive a SIGSEGV signal? But i find no signal being received. Am i missing something in this... (0 Replies)
Discussion started by: prajwalps97
0 Replies

7. Programming

Signal processing

We have written a deamon which have many threads. We are registering for the SIGTERM and trying to close main thread in this signal handling. Actually these are running on Mac OS X ( BSD unix). When we are unloading the deamon with command launchctl, it's sending SIGTERM signal to our process... (1 Reply)
Discussion started by: Akshay4u
1 Replies

8. UNIX for Dummies Questions & Answers

signal() and sigsetjmp()

Hi, I am basically new to signals in UNIX. My question is, should the signal() command be called only once in the program? What will happen if it's called multiple times? I am trying to write an alarm program where the signal handler function changes in runtime. It just doesn't work if I... (2 Replies)
Discussion started by: bashdrew
2 Replies

9. Shell Programming and Scripting

Searching for file names in a directory while ignoring certain file names

Sun Solaris Unix Question Haven't been able to find any solution for this situation. Let's just say the file names listed below exist in a directory. I want the find command to find all files in this directory but at the same time I want to eliminate certain file names or files with certain... (2 Replies)
Discussion started by: 2reperry
2 Replies

10. Shell Programming and Scripting

Exclude certain file names while selectingData files coming in different names in a file name called

Data files coming in different names in a file name called process.txt. 1. shipments_yyyymmdd.gz 2 Order_yyyymmdd.gz 3. Invoice_yyyymmdd.gz 4. globalorder_yyyymmdd.gz The process needs to discard all the below files and only process two of the 4 file names available ... (1 Reply)
Discussion started by: dsravanam
1 Replies
Signal(3pm)						User Contributed Perl Documentation					       Signal(3pm)

NAME
IPC::Signal - Utility functions dealing with signals SYNOPSIS
$number = sig_num $name; $name = sig_name $number; sig_translate_setup; $number = $Sig_num{$name}; $name = $Sig_name[$number]; DESCRIPTION
This module contains utility functions for dealing with signals. Nothing is exported by default. sig_num chopped-signal-name Returns the signal number of the signal whose name (sans "SIG") is chopped-signal-name, or undef if there is no such signal. This function is prototyped to take a single scalar argument. sig_name signal-number Returns the chopped signal name (like "HUP") of signal number signal-number, or undef if there is no such signal. This function is prototyped to take a single scalar argument. sig_translate_setup If you want to use the @Sig_name and %Sig_num variables directly you must call sig_translate_setup to initialize them. This isn't nec- essary if you only use the function interfaces sig_name() and sig_num(). This function is prototyped to take no arguments. %Sig_num A hash with chopped signal name keys (like "HUP") and integer signal number values. @Sig_name An array mapping signal numbers to chopped signal names (like "HUP"). AUTHOR
Roderick Schertler <roderick@argon.org> SEE ALSO
perl(1). perl v5.8.8 1998-12-28 Signal(3pm)
All times are GMT -4. The time now is 07:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy