Subject: bin/12113: ping: -w function and doc mismatch
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jbernard@mines.edu>
List: netbsd-bugs
Date: 02/02/2001 07:35:20
>Number:         12113
>Category:       bin
>Synopsis:       ping: -w function and doc mismatch
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 02 07:38:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jim Bernard
>Release:        Feb. 2, 2001
>Organization:
>Environment:
System: NetBSD zoo 1.5R NetBSD 1.5R (ZOO-$Revision: 1.60 $) #0: Sat Jan 27 21:54:35 MST 2001 jim@zoo:/home/tmp/compile/sys/arch/i386/compile/ZOO i386
Architecture: i386
Machine: i386
>Description:
	The man page says:

	  -w maxwait
		Specifies the number of seconds to wait for a response to a pack-
		et before transmitting the next one.  The default is 10.0.

	but the behavior is for ping to terminate after maxwait seconds.

>How-To-Repeat:
	ping -w 3 your_favorite_host
	or examine ping.c

>Fix:
	I don't know which was the originally intended behavior, so it's not
	immediately clear whether the code or the documentation is in error.
	(Though it looks like the code was quite intentionally designed to
	do exactly what it does.)  This feature and its documentation were
	introduced in July, 1995 by ghudson (rev. 1.8 of ping.8, rev. 1.19
	of ping.c), so it might be worthwhile to ask him what was his
	intention.  I did notice on a Red Hat Linux system that uses a
	version of the same code (iputils-ss990107) that the man page had
	been changed to read:

	-w deadline
	      Specify a timeout, in seconds, before ping exits regardless of
	      how many packets have been sent or received.

>Release-Note:
>Audit-Trail:
>Unformatted: