Brian, On Tuesday 05 October 2004 10:50, Brian Jackson wrote:
Hi-
Think back to your shell programming days.... Ahh, the good times :)
Back?
Ok, I'm trying to send a particular signal to a running process. I'm assuming that I use SIGUSR1 and SIGUSR2.
How do I go about configuring what those are signal values are in my shell script (bash in particular)?
Try this: % help kill kill: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec] Send the processes named by PID (or JOB) the signal SIGSPEC. If SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l' lists the signal names; if arguments follow `-l' they are assumed to be signal numbers for which names should be listed. Kill is a shell builtin for two reasons: it allows job IDs to be used instead of process IDs, and, if you have reached the limit on processes that you can create, you don't have to start a process to kill another one. This will tell you that you can use symbolic signal names or tell you that you can use: % kill -l 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 11) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP 21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ 26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO 30) SIGPWR 31) SIGSYS 35) SIGRTMIN .. 64) SIGRTMAX
I don't need to do this in perl nor in C, but bash. I've dug on the net, but haven't been too successful, that and I don't have my UNIX Power Tools book with me right now.
Naturally, "man bash" would tell you this, as well.
thanks, brian -- Brian Jackson Photo
Randall Schulz -- Making BASH jump through hoops since 1997.