Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177631682
D56721.1794894717.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
941 B
Referenced Files
None
Subscribers
None
D56721.1794894717.diff
View Options
diff --git a/sbin/ping/ping6.c b/sbin/ping/ping6.c
--- a/sbin/ping/ping6.c
+++ b/sbin/ping/ping6.c
@@ -111,6 +111,7 @@
#include <err.h>
#include <errno.h>
#include <fcntl.h>
+#include <poll.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
@@ -1145,7 +1146,7 @@
struct timespec now, timeout;
struct msghdr m;
struct iovec iov[2];
- fd_set rfds;
+ struct pollfd pfd;
int n;
/* signal handling */
@@ -1154,15 +1155,16 @@
seeninfo = 0;
continue;
}
- FD_ZERO(&rfds);
- FD_SET(srecv, &rfds);
+ pfd.fd = srecv;
+ pfd.events = POLLIN;
+ pfd.revents = 0;
clock_gettime(CLOCK_MONOTONIC, &now);
timespecadd(&last, &intvl, &timeout);
timespecsub(&timeout, &now, &timeout);
if (timeout.tv_sec < 0)
timespecclear(&timeout);
- n = pselect(srecv + 1, &rfds, NULL, NULL, &timeout, NULL);
+ n = ppoll(&pfd, 1, &timeout, NULL);
if (n < 0)
continue; /* EINTR */
if (n == 1) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 17, 5:51 AM (3 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41794079
Default Alt Text
D56721.1794894717.diff (941 B)
Attached To
Mode
D56721: ping6: convert receive loop from pselect(2) to ppoll(2)
Attached
Detach File
Event Timeline