Describe how to use sigaction such that a process receiving
Describe how to use sigaction such that a process receiving a signal can know the pid of the originating process of this signal. Describe how to use sigaction such that a process can send a payload with the signal that can retrieved by the receiving process.
Solution
The sigaction will change the signal action.The sigaction() system call is used to change the action taken by a process id of a specific signal.
The syntax for the sigaction is that
int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
signum- is a signal
sigaction- new action
truct sigaction *oldact-old action of signum
recvmmsg() system call for receiving multiple
messages
sigaction() returns 0 on success and -1 on error.
