From 9159ab1402815cf212bd1992de9ed6abf6503abb Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 14 Aug 2008 16:18:46 -0700 Subject: [PATCH] Fix vlogconf EINTR error returns. Bug #111. --- lib/vlog-socket.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/vlog-socket.c b/lib/vlog-socket.c index 49d9589d..2428bfa6 100644 --- a/lib/vlog-socket.c +++ b/lib/vlog-socket.c @@ -46,6 +46,7 @@ #include "fatal-signal.h" #include "poll-loop.h" #include "socket-util.h" +#include "timeval.h" #include "util.h" #include "vlog.h" @@ -383,11 +384,11 @@ vlog_client_recv(struct vlog_client *client, char **reply) pfd.fd = client->fd; pfd.events = POLLIN; - nfds = poll(&pfd, 1, 1000); + nfds = time_poll(&pfd, 1, 1000); if (nfds == 0) { return ETIMEDOUT; } else if (nfds < 0) { - return errno; + return -nfds; } nbytes = read(client->fd, buffer, sizeof buffer - 1); -- 2.30.2