Olaf Kirch <[EMAIL PROTECTED]> writes:

>  3.   There seems to be a bug somewhere in the handling of poll().
>       If you observe the traceroute process with strace, you'll
>       notice that it starts spinning madly after receiving the
>       first bunch of packets (those with ttl 1).
> 
>       13:43:02 poll([{fd=4, events=POLLERR}], 1, 5) = 0
>       13:43:02 poll([{fd=4, events=POLLERR}], 1, 5) = 0
>       13:43:02 poll([{fd=4, events=POLLERR}], 1, 5) = 0
>       13:43:02 poll([{fd=4, events=POLLERR}], 1, 5) = 0
>       ...
> 
>       I.e. the poll call returns as if it had timed out, but it
>       hasn't.

 I've just looked at it, but I'm pretty sure this is a bug in your
code. This should fix it...

--- traceroute.c.orig   Wed Dec  6 10:33:48 2000
+++ traceroute.c        Wed Dec  6 10:34:06 2000
@@ -193,7 +193,7 @@
                                timeout = hop->nextsend;
                }
 
-               poll(pfd, m, timeout - now);
+               poll(pfd, m, (timeout - now) * 1000);
 
                /* Receive any pending ICMP errors */
                for (n = 0; n < m; n++) {


-- 
# James Antill -- [EMAIL PROTECTED]
:0:
* ^From: .*[EMAIL PROTECTED]
/dev/null
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to