Send Signal
Kill the current terminal with the KILL command at the terminal
R
As above, when using kill-sigcont 2563 , the terminal ignores the signal
When using kill-sigabrt 2563 , the terminal exits. Need to re-enter user name password login.
int Kill (__pid_t __pid, int __sig) : Sends a signal to the specified process . The first parameter is the process number to pass the signal, and the second parameter is the signal value to send.
int raise (int __sig) : Sends a signal to the current process that wakes up a process. Returns 0 successfully, otherwise returns-1.
Equivalent to
if int __sig) = =-1) perror ("raise");
Using the Raise function
if 0 ) perror ("Failed to raise SIGUSR1");
unsigned int alarm (unsigned int __seconds) : Generates a SIGALRM signal to the current process within a specified time. Each time this function is called, a signal is generated, not a loop that generates a signal. The process terminates execution when the signal is received by default.
"Linux Advanced Programming" (tenth) Linux asynchronous signal processing mechanism