Questions tagged [sigaction]

The sigaction() system call is used to change the action taken by a process on receipt of a specific signal.

The sigaction() function allows the calling process to examine and/or specify the action to be associated with a specific signal. In computing, sigaction is a function API defined by POSIX to give the programmer access to what should be a program's behavior when receiving specific OS

106 questions
-1
votes
1 answer

I want to use sigaction(), but I've a problem

I want to make a program that If process receive SIGQUIT, print some message and terminate the process. and here is my code, void signal_handler(int num) { printf(Received SIGQUIT\n"); kill(getpid(), SIGINT); } int main() { struct sigaction…
1 2 3 4 5 6 7
8