c - How to use SIGUSR1 alternate values -
in man 7 signal
shows sigusr1 sigusr1 30,10,16 term user-defined signal 1
. if use sigusr1 in c code, value 10. there way access other values 30 & 16? okay use them explicitly in signal handler
if(signo == 16) { printf("sigusr1 type 2 received\n"); }
edit:in code , there case statement uses sigusr1 already. need 1 more custom signal . know there rtsignals , other options. wanted know why specify 16,30 in man page , never provide way use it.
the manual says
several signal numbers architecture dependent, indicated in "value" column. (where 3 values given, first 1 valid alpha , sparc, middle 1 i386, ppc , sh, , last 1 mips. - denotes signal absent on corresponding architecture.)
the sigusr1 have 1 value on whatever machine you're running on ... there no alternate values; use defined constant sigusr1. using 16 give wrong signal ... further in table , see sigstkflt.
i need 1 more custom signal
what's wrong sigusr2?
Comments
Post a Comment