X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org From: "Tom Van Looy" To: cygwin AT cygwin DOT com Sensitivity: Normal Message-ID: X-Forwarded-For: [10.10.1.191] Date: Wed, 28 May 2008 10:11:30 +0000 Subject: Bug in /usr/bin/ping Reply-To: assarix AT pandora DOT be MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi /usr/bin/ping does not return the correct return code on ping failure. See example below, the .8 host does not exist, .9 does exist: $ ping 56 1 192.168.20.9 > /dev/null ; echo $? 0 $ ping 56 1 192.168.20.8 > /dev/null ; echo $? 0 I checked Linux and Windows versions of ping and they work correctly. $ ping -c 1 192.168.20.8 > /dev/null ; echo $? 1 $ ping -c 1 192.168.20.9 > /dev/null ; echo $? 0 $ /cygdrive/c/WINDOWS/system32/ping.exe -n 1 \ > 192.168.20.8 > /dev/null ; echo $? 1 $ /cygdrive/c/WINDOWS/system32/ping.exe -n 1 \ > 192.168.20.9 > /dev/null ; echo $? 0 I didn't look into the ping source, so no diff ... I just aliased ping with the windows version as a workaround. Kind regards, Tom Van Looy -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/