From: Kefu Chai Date: Wed, 23 Nov 2016 05:26:31 +0000 (+0800) Subject: global/signal_handler: retry if read() returns with EINTR X-Git-Tag: v11.1.0~139^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1f0abeffa76db1e4a7835153c9a299e89622e2ac;p=ceph.git global/signal_handler: retry if read() returns with EINTR this silences the warning of Value stored to 'r' is never used. Signed-off-by: Kefu Chai --- diff --git a/src/global/signal_handler.cc b/src/global/signal_handler.cc index f465b402d56c..01732cce4480 100644 --- a/src/global/signal_handler.cc +++ b/src/global/signal_handler.cc @@ -281,7 +281,7 @@ struct SignalHandler : public Thread { char v; // consume byte from signal socket, if any. - r = read(pipefd[0], &v, 1); + TEMP_FAILURE_RETRY(read(pipefd[0], &v, 1)); lock.Lock(); for (unsigned signum=0; signum<32; signum++) {