07-16-2010
Yes, that's about correct.
As for the signals, one is pretty much limited to the signals reported by "kill -l", minus a few. For example, SIGKILL can't be trapped. And for shell scripts there's the additional signal 0, which is triggered whenever the script exits (great for cleanup).
USR1 and USR2 are intended for use for IPC, as they have no fixed meaning. Other typical uses are SIGHUP (HangUP) to tell daemons to reinitialize themselves without restarting, SIGINT for catching ^C, or SIGWINCH when the terminal window was resized.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dears,
I've written a script which allows me to send mails in different formats with different attaches. Now I still want to add a feature to this script. My users would like to be able to receive a "read" or "delivered" receipt for their mails.
The script send mails on behalve of an specific... (1 Reply)
Discussion started by: plelie2
1 Replies
2. Shell Programming and Scripting
In this post, Perderabo's script says
echo 05/06/25 14:15:56 | IFS=" /:" read Y1 M1 D1 h1 m1 s1
which, if I am not wrong, will break the input into Y1, M1 et al.
I tried the following in my code
#! /bin/ksh
# per.sh
typeset -R2 HOUR=00
typeset -R2 MIN=00
typeset -R2 SEC=00
... (2 Replies)
Discussion started by: vino
2 Replies
3. Shell Programming and Scripting
Hallo,
i need a Prompting read in my script:
read -p "Enter your command: " command
But i always get this Error:
-p: is not an identifier
When I run these in c-shell i get this error
/usr/bin/read: read: bad option(s)
How can I use a Prompt in the read command? (9 Replies)
Discussion started by: wiseguy
9 Replies
4. Red Hat
Friends ,
Anybody plz tell me what is the basic difference between "service" , "process" and " daemon" ?
Waiting for kind reply .. .. (1 Reply)
Discussion started by: shipon_97
1 Replies
5. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
6. Shell Programming and Scripting
Hi,
Could anyone please shed some light on the following script lines and what is it doing as it was written by an ex-administrator?
cat $AMS/version|read a b verno d
DBVer=$(/usr/bin/printf "%7s" $verno)
I checked that the cat $AMS/version command returns following output:
... (10 Replies)
Discussion started by: dbadmin100
10 Replies
7. Shell Programming and Scripting
I want to print any matching IP addresse in List1 with List 2;
List 1
List of IP addresses;
161.85.58.210
250.57.15.129
217.23.162.249
74.76.129.101
30.221.177.237
3.147.200.59
170.58.142.64
127.65.109.33
150.167.242.146
223.3.20.186
25.181.180.99
2.55.199.32 (3 Replies)
Discussion started by: lewk
3 Replies
8. Shell Programming and Scripting
Hi ,
I am trying to read a list of hosts from a config file and trying to get file list from that host. For this I have used one while loop.
cat "$ARCHIVE_CFG_FILE" | sed '/^$/d' | sed '/^#/d' | while read ARCHIVE_CFG
do
SOURCE_SERVER_NAME=`echo "$ARCHIVE_CFG" | awk -F '|' '{ print... (2 Replies)
Discussion started by: Anupam_Halder
2 Replies
9. UNIX for Dummies Questions & Answers
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
SKILL(1) Linux User's Manual SKILL(1)
NAME
skill, snice - send a signal or report process status
SYNOPSIS
skill [signal to send] [options] process selection criteria
snice [new priority] [options] process selection criteria
DESCRIPTION
These tools are probably obsolete and unportable. The command syntax is poorly defined. Consider using the killall, pkill, and pgrep com-
mands instead.
The default signal for skill is TERM. Use -l or -L to list available signals. Particularly useful signals include HUP, INT, KILL, STOP,
CONT, and 0. Alternate signals may be specified in three ways: -9 -SIGKILL -KILL.
The default priority for snice is +4. (snice +4 ...) Priority numbers range from +20 (slowest) to -20 (fastest). Negative priority num-
bers are restricted to administrative users.
GENERAL OPTIONS
-f fast mode This is not currently useful.
-i interactive use You will be asked to approve each
action.
-v verbose output Display information about selected
processes.
-w warnings enabled This is not currently useful.
-n no action This only displays the process ID.
-V show version Displays version of program.
PROCESS SELECTION OPTIONS
Selection criteria can be: terminal, user, pid, command. The options below may be used to ensure correct interpretation. Do not blame
Albert for this interesting interface.
-t The next argument is a terminal (tty or pty).
-u The next argument is a username.
-p The next argument is a process ID number.
-c The next argument is a command name.
SIGNALS
The signals listed below may be available for use with skill. When known, numbers and default behavior are shown.
Name Num Action Description
() ()
0 0 n/a exit code indicates if a signal may be sent
ALRM 14 exit
HUP 1 exit
INT 2 exit
KILL 9 exit this signal may not be blocked
PIPE 13 exit
POLL exit
PROF exit
TERM 15 exit
USR1 exit
USR2 exit
VTALRM exit
STKFLT exit may not be implemented
PWR ignore may exit on some systems
WINCH ignore
CHLD ignore
URG ignore
TSTP stop may interact with the shell
TTIN stop may interact with the shell
TTOU stop may interact with the shell
STOP stop this signal may not be blocked
CONT restart continue if stopped, otherwise ignore
ABRT 6 core
FPE 8 core
ILL 4 core
QUIT 3 core
SEGV 11 core
TRAP 5 core
SYS core may not be implemented
EMT core may not be implemented
BUS core core dump may fail
XCPU core core dump may fail
XFSZ core core dump may fail
EXAMPLES
Command Description
snice seti crack +7 Slow down seti and crack
skill -KILL -v /dev/pts/* Kill users on new-style PTY devices
skill -STOP viro lm davem Stop 3 users
snice -17 root bash Give priority to root's shell
SEE ALSO
killall(1) pkill(1) kill(1) renice(1) nice(1) signal(7) kill(2)
STANDARDS
No standards apply.
AUTHOR
Albert Cahalan <albert@users.sf.net> wrote skill and snice in 1999 as a replacement for a non-free version, and is the current maintainer
of the procps collection. Please send bug reports to <procps-feedback@lists.sf.net>.
()