From owner-freebsd-questions Thu Mar 23 16:35:26 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id QAA29926 for questions-outgoing; Thu, 23 Mar 1995 16:35:26 -0800 Received: from Root.COM (implode.Root.COM [198.145.90.1]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id QAA29915 for ; Thu, 23 Mar 1995 16:35:24 -0800 Received: from corbin.Root.COM (corbin.Root.COM [198.145.90.18]) by Root.COM (8.6.8/8.6.5) with ESMTP id QAA07298; Thu, 23 Mar 1995 16:35:07 -0800 Received: from localhost (localhost [127.0.0.1]) by corbin.Root.COM (8.6.11/8.6.5) with SMTP id QAA00365; Thu, 23 Mar 1995 16:35:07 -0800 Message-Id: <199503240035.QAA00365@corbin.Root.COM> X-Authentication-Warning: corbin.Root.COM: Host localhost didn't use HELO protocol To: dlr@netcom.com (dlr) cc: questions@FreeBSD.org Subject: Re: ping under freebsd In-reply-to: Your message of "Thu, 23 Mar 95 13:41:21 PST." <199503232141.NAA05443@netcom.netcom.com> From: David Greenman Reply-To: davidg@Root.COM Date: Thu, 23 Mar 1995 16:35:06 -0800 Sender: questions-owner@FreeBSD.org Precedence: bulk >the problem I am at now is that bsd ping returns a zeroeven if the >connection isn't established. This behavior was added just after the 2.0 release: -------- revision 1.4 date: 1994/11/29 16:09:56; author: davidg; state: Exp; lines: +4 -1 In past releases of FreeBSD, I have used the exit status of "ping" to determine whether a connection to a given machine is up or not. In FreeBSD 2.0 (and therefore, I assume, BSD 4.4) the exit code of ping is always zero, even if no packets were received. I would like to propose the following change to /usr/src/sbin/ping/ping.c to restore this useful behaviour: Submitted by: Denis Fortin -------- -DG