From: Christian Hesse <list@eworm.de>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: Christian Hesse <mail@eworm.de>
Subject: [linux-lvm] [PATCH 1/1] libdaemon: do not print error if there is non
Date: Mon, 11 Jul 2016 23:48:47 +0200 [thread overview]
Message-ID: <20160711214847.563-1-list@eworm.de> (raw)
From: Christian Hesse <mail@eworm.de>
accept() returns EAGAIN if no connections are present to be accepted.
That's not an error, so do not print error if there is non.
Signed-off-by: Christian Hesse <mail@eworm.de>
---
libdaemon/server/daemon-server.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c
index 7911dd6..6de545e 100644
--- a/libdaemon/server/daemon-server.c
+++ b/libdaemon/server/daemon-server.c
@@ -491,7 +491,8 @@ static int handle_connect(daemon_state s)
client.socket_fd = accept(s.socket_fd, (struct sockaddr *) &sockaddr, &sl);
if (client.socket_fd < 0) {
- ERROR(&s, "Failed to accept connection.");
+ if (errno != EAGAIN && (EWOULDBLOCK != EAGAIN && errno != EWOULDBLOCK))
+ ERROR(&s, "Failed to accept connection.");
return 0;
}
--
2.9.0
reply other threads:[~2016-07-11 22:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160711214847.563-1-list@eworm.de \
--to=list@eworm.de \
--cc=linux-lvm@redhat.com \
--cc=mail@eworm.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).