msgrcv - SA_RESTART flag doesn't work
问题 There is something wrong with my code that uses IPC queue to communicate between threads. I need to handle SIGINT safely - let program finish all active threads when SIGINT appeared before shutting down. Though, I have serious problem of finding solution because even with sigaction for SIGINT with flag SA_RESTART the msgrcv function is getting EINTR error. My question is - is there any way to avoid EINTR with msgrcv function other than specifying the error condition in some "if" such as: if