summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyril Hrubis <metan@ucw.cz>2017-05-31 13:38:37 +0200
committerCyril Hrubis <metan@ucw.cz>2017-06-01 16:13:00 +0200
commit6598a7a2b234e0f5eaf4c1bdd14c1d77614b7439 (patch)
treee42bbd89da2fd58ed30f954cb0f8de37171aebcd
parent1ef0e4c86d358c8e217b90686394196412e184d2 (diff)
downloadiputils-6598a7a2b234e0f5eaf4c1bdd14c1d77614b7439.tar.gz
ping_common.c: POLLERRR is ignored in events
See 'man poll' or fs/select.c in kernel sources, POLLERR is ignored in events and if error happens it will be returned regardless. Signed-off-by: Cyril Hrubis <metan@ucw.cz>
-rw-r--r--ping_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ping_common.c b/ping_common.c
index b0825e3..bc364e7 100644
--- a/ping_common.c
+++ b/ping_common.c
@@ -651,7 +651,7 @@ void main_loop(ping_func_set_st *fset, socket_st *sock, __u8 *packet, int packle
((options & (F_ADAPTIVE|F_FLOOD_POLL)) || interval)) {
struct pollfd pset;
pset.fd = sock->fd;
- pset.events = POLLIN|POLLERR;
+ pset.events = POLLIN;
pset.revents = 0;
if (poll(&pset, 1, next) < 1 ||
!(pset.revents&(POLLIN|POLLERR)))