0

I am using recvmmsg to read from a blocking UDP socket out of a mutlicast group.

In the man pages of that API I noted that the errors messages don't mention EINTR so it looks like that api cannot catch when a signal has been received.

I tested and I can see that if I issue a CTRL-C when recvmmsg is blocked waiting on some data to read nothing happens and it remains blocked.

Do you know why this is happening and how to catch the signal correctly?

I am using Linux CentOs 7 and Oracle Linux

Abruzzo Forte e Gentile
  • 14,423
  • 28
  • 99
  • 173
  • I don't know the answer to your specific question but wanted to point out that the man page does mention EINTR. It just does do by reference rather than directly: "Errors are as for recvmsg(2).....". And `recvmsg` lists EINTR as one of the errors. – kaylum Aug 21 '15 at 06:57
  • The default action for `SIGINT` is to terminate; if that doesn't happen, it means you're either blocking `SIGINT` or changed the default disposition. Can you show the code where you do that? You might be going about it the wrong way. – Filipe Gonçalves Aug 21 '15 at 10:47

0 Answers0