summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
19f34e3)
SCCS-vsn: sbin/ping/ping.c 5.3
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)ping.c 5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)ping.c 5.3 (Berkeley) %G%";
while (preload--) /* fire off them quickies */
pinger();
while (preload--) /* fire off them quickies */
pinger();
- if (options & F_FLOOD) {
- timeout.tv_sec = 0;
- timeout.tv_usec = 10000;
- fdmask = 1 << s;
- } else
+ if ((options & F_FLOOD) == 0)
catcher(); /* start things going */
for (;;) {
catcher(); /* start things going */
for (;;) {
if (options & F_FLOOD) {
pinger();
if (options & F_FLOOD) {
pinger();
- if (!select(32, (fd_set *)&fdmask, (fd_set *)NULL,
- (fd_set *)NULL, &timeout))
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 10000;
+ fdmask = 1 << s;
+ if (select(s + 1, (fd_set *)&fdmask, (fd_set *)NULL,
+ (fd_set *)NULL, &timeout) < 1)
continue;
}
fromlen = sizeof(from);
continue;
}
fromlen = sizeof(from);