Sponsored Content
Top Forums Programming add more user-defined signals Post 302438632 by jim mcnamara on Tuesday 20th of July 2010 09:06:53 AM
Old 07-20-2010
Pick another signal - one that will not be raised by any of the system calls, one that you can block.

This is by no means guaranteed to work. If your system supports realtime signals you can look into those as well. They may be called something like RTMIN or RTMAX.

kill -l ( that is the letter L lowercase) lists all of the signals on your system.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Nawk user-defined function

HELP!!!! I am in an on-line shell programming class and have a question. Here is the data: Mike Harrington:(510) 548-1278:250:100:175 Christian Dobbins:(408) 538-2358:155:90:201 Susan Dalsass:(206) 654-6279:250:60:50 (There are 12 contribuors total) This database contains names, phone... (1 Reply)
Discussion started by: NewbieGirl
1 Replies

2. AIX

User defined signal 1

Hi, I am just running a incremental back-up on one of my server. But these days It abrubtly fails with below error. ========== User defined signal 1 =========== When I rerun the back-up, It completed successfully.Earlier this was not happening. Any Idea, what could be the problem... (0 Replies)
Discussion started by: nitesh_raj
0 Replies

3. UNIX for Dummies Questions & Answers

User defined service

I want to add a new IP service which executes a script on SCO OS5. I have amended /etc/services and added to port number (3333) I have amended /etc/inetd.conf and added a line for this service but I can't get it to execute my own shell script When I telnet to the IP address on port 3333 I... (1 Reply)
Discussion started by: markdrury
1 Replies

4. Shell Programming and Scripting

need help with User Defined Function

Dear Friends, I need a help regarding User defined function in shell script. My problem is as follows: my_func.sh my_funcI(){ grep 'mystring' I.dat } my_funcQ(){ grep 'mystring' Q.dat } myfuncI myfuncQ But As both the function has same function only the... (11 Replies)
Discussion started by: user_prady
11 Replies

5. Solaris

Wants to use User defined Macro in Makefile

I am converting 32-bit C++ code to 64-bit on Solaris. I have used unsigned long in number of files. I want it to convert to unsigned int for 64-bit. Total files are around 2000. Can you please help me if possible to do it in makefile using MACRO while build. If it is not possible any other... (2 Replies)
Discussion started by: amit_27
2 Replies

6. Shell Programming and Scripting

Unable to add user defined variable

Hi, I have a user defined variable _TIME1=xxx I am using awk command for pattern matching. cat $_LOCATION/catalina.txt | awk '/^`$_TIME1`:??:??/' It not taking the value of $_TIME! eg:I am using the command to get all the patter from 12:00:00 to 12:59:59 The user defined variable... (2 Replies)
Discussion started by: ahamed
2 Replies

7. Programming

how to add user defined tag in a mp3 file?

Hai all, Can anyone explain me about how to add an user defined tag in an mp3 file using MP3::Tag module in perl? (0 Replies)
Discussion started by: thillai_selvan
0 Replies

8. Shell Programming and Scripting

User defined functions in awk

Hi; Is der ne to to use user defined functions for the values in awk find $1 -type f -ls | nawk '{{print "|"$3"|"$5"|"$6"|"$8"|"$9"|"$10"|"} for(i=11;i<=NF;i++){printf("%s",$i)}}' In above command i want to append some values returned by user functions on line. thnks; ajay (1 Reply)
Discussion started by: ajaypadvi
1 Replies

9. UNIX for Dummies Questions & Answers

user defined commands

Hi, i would like to create user defined commands. e,g: if an user executes , mkdircd test then a directory called test should be created and it should be cd to test. How i can create the command mkdircd with below action: mkdir $1 && cd $1. Please help me in achieving this (7 Replies)
Discussion started by: pandeesh
7 Replies
str2sig(3C)						   Standard C Library Functions 					       str2sig(3C)

NAME
str2sig, sig2str - translation between signal name and signal number SYNOPSIS
#include <signal.h> int str2sig(const char *str, int *signum); int sig2str(int signum, char *str); DESCRIPTION
The str2sig() function translates the signal name str to a signal number, and stores that result in the location referenced by signum. The name in str can be either the symbol for that signal, without the "SIG" prefix, or a decimal number. All the signal symbols defined in <sys/signal.h> are recognized. This means that both "CLD" and "CHLD" are recognized and return the same signal number, as do both "POLL" and "IO". For access to the signals in the range SIGRTMIN to SIGRTMAX, the first four signals match the strings "RTMIN", "RTMIN+1", "RTMIN+2", and "RTMIN+3" and the last four match the strings "RTMAX-3", "RTMAX-2", "RTMAX-1", and "RTMAX". The sig2str() function translates the signal number signum to the symbol for that signal, without the "SIG" prefix, and stores that symbol at the location specified by str. The storage referenced by str should be large enough to hold the symbol and a terminating null byte. The symbol SIG2STR_MAX defined by <signal.h> gives the maximum size in bytes required. RETURN VALUES
The str2sig() function returns 0 if it recognizes the signal name specified in str; otherwise, it returns -1. The sig2str() function returns 0 if the value signum corresponds to a valid signal number; otherwise, it returns -1. EXAMPLES
Example 1 A sample program using the str2sig() function. int i; char buf[SIG2STR_MAX]; /*storage for symbol */ str2sig("KILL",&i); /*stores 9 in i */ str2sig("9", &i); /* stores 9 in i */ sig2str(SIGKILL,buf); /* stores "KILL" in buf */ sig2str(9,buf); /* stores "KILL" in buf */ SEE ALSO
kill(1), strsignal(3C) SunOS 5.11 7 Oct 1999 str2sig(3C)
All times are GMT -4. The time now is 11:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy