Related questions
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 to "Advanced Programming in the UNIX Environment, 2nd edition", figure 10.1 the default value of SIGCHLD is "ignore."
If "ignore" meant "…
What does WEXITSTATUS(status) return?
I am trying to understand how WEXITSTATUS(status) works. I have come across a piece of code where the return value of WEXITSTATUS(status) is being added to a variable.
Here is the snippet:
waitpid(-1, &status, 0);
counter += WEXITSTATUS(…
How to capture Control+D signal?
I want to capture the Ctrl+D signal in my program and write a signal handler for it.
How can I do that?
I am working on C and using a Linux system.