Top "Signal-handling" questions

In the C Standard Library, signal processing defines how a program handles various signals while it executes.

How can a process kill itself?

#include<stdlib.h> #include<unistd.h> #include<signal.h> int main(){ pid_t pid = …

linux process kill signal-handling sigterm
signal handler function in multithreaded environment

In my multithreaded GUI application I have the following signal handling code. I want to improve this code so that …

c++ c multithreading signal-handling
Get Keyboard Interrupt in C

Program: #include<stdio.h> void main() { int time=1800; while(1){ system("clear"); time-=1; printf("%d\n",time); sleep(1); if(…

c linux unix keyboard signal-handling
How are asynchronous signal handlers executed on Linux?

I would like to know exactly how the execution of asynchronous signal handlers works on Linux. First, I am unclear …

c linux signals signal-handling
catching signals while reading from pipe with select()

using select() with pipe - this is what I am doing and now I need to catch SIGTERM on that. …

c signals pipe signal-handling
What's the difference between various $SIG{CHLD} values?

What is the difference between these settings? $SIG{CHLD} = 'IGNORE' $SIG{CHLD} = 'DEFAULT' $SIG{CHLD} = '' $SIG{CHLD} = undef According …

perl unix signals signal-handling sigchld
How do i remove a signal handler

I've made the follow signal handler struct sigaction pipeIn; pipeIn.sa_handler = updateServer; sigemptyset(&pipeIn.sa_mask); sa.sa_…

c posix signal-handling
How to resolve REG_EIP undeclared (First use in this function ) error on Linux 32 bit machine?

I have been coming across errors in compilation of my signal handler program written in C language with gcc in …

c linux gcc signal-handling
Python:Django: Signal handler and main thread

I am building a django application which depends on a python module where a SIGINT signal handler has been implemented. …

python django multithreading signal-handling
Python - Handle CTRL+D with 'import signal'

I can currently handle CTRL+C via: def hand_inter(signum, frame): print 'hey, nice job.' signal.signal(signal.…

python exception-handling signals interrupt signal-handling