I have a C code which captures SIGUSR1, SIGTERM signals. Is there any possible way to figure out which process has send the signal to it, in signal handler?..
See sigaction, and look at the siginfo_t structure.
See the manpage of sigaction()
Hint: the signal handler function's second parameter is of type siginfo_t, which is a structure having the pid_t of the sending process' pid.
thanks , i got it done through sigaction () and sigqueue() to send payload.
-Happy Coding -