restore recvmsg

This commit is contained in:
Nikos Mavrogiannopoulos
2015-05-06 21:09:56 +02:00
parent 8b32d185c6
commit 111e5a9b5f
2 changed files with 6 additions and 2 deletions

View File

@@ -74,7 +74,9 @@ int handle_sec_mod_commands(main_server_st * s)
hdr.msg_iov = iov;
hdr.msg_iovlen = 2;
ret = recvmsg(s->sec_mod_fd, &hdr, 0);
do {
ret = recvmsg(s->sec_mod_fd, &hdr, 0);
} while(ret == -1 && errno == EINTR);
if (ret == -1) {
e = errno;
mslog(s, NULL, LOG_ERR,

View File

@@ -84,7 +84,9 @@ int handle_worker_commands(struct worker_st *ws)
hdr.msg_control = control_un.control;
hdr.msg_controllen = sizeof(control_un.control);
ret = recvmsg( ws->cmd_fd, &hdr, 0);
do {
ret = recvmsg( ws->cmd_fd, &hdr, 0);
} while(ret == -1 && errno == EINTR);
if (ret == -1) {
e = errno;
oclog(ws, LOG_ERR, "cannot obtain data from command socket: %s", strerror(e));