delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/03/16/12:07:39

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; q=dns; s=default; b=gr
hrEMJD0uoqevazJ6AUWtzdjbR3CzAwdgI8xxw5kdKZzh4OL7YKB2ucwuu5BXV3Gc
qovPR/4tIGc8FncWqdMb7WsKrdWlpL/TuZc1FSskpBP5zl09YCT7qmL4UWP1nXGv
ZZbItEjzjJo9nbbInVCmke7TexkUybi2ut1DRPupk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; s=default; bh=OLyqq1Ny
Bfby0qYiMDPId0RVAvQ=; b=XZtkid77ET04ES8AjEgO7FyUpnwi2yAl9uTtigkU
cWxIyxLMy0TEVHzxec3LQLq87ERdVCDGC5UzocfhzBlc/zFrxkC1CwxbYW2tRxCx
CAANmzw6ArV1kCQlE2z8qUdvgx8QlwEjXwHQFEr0/4j/3S+xS9xTrXdYon0P73id
FVA=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_05,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Lee, nxdomain, NXDOMAIN, approximate
X-HELO: mail-wm0-f45.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=yhr8fU+hIQHbrKOlZwiJexvkPUEM2Idk7GMKWXCfF60=; b=WGIlFpAyWEF5nBHITCo8Jioa20osfmIPm4BGLGKdYyOH2S13gCmvuQ+js4CbUS6Bv0 ZoIahylJ39DmROCxXAB4jLK68wRm03ObnhdOjhwI5AWBd+vtDA5ANh3P+PjDwYVtRyjf kUciojKRU/2ef0cSMs+F4azfUfhuf0Nbi03Tjrl6RIemuyh2Ac4+YhLeuxPsnuJGlbKh 5sj3STVMX9GWuDc3i0CSW6Yp+Q+xVOMYtqPK4+Ibw9Fkmbwt/wDVGAiUJ8lPHA7D4cZ8 AOEMaVaQl4EVFeqN1ZVI4Fmbt6G9f9tCYC6sDIENBGHmKGDDAM+IgvQIyPFhuNN1qlNP gq0Q==
X-Gm-Message-State: AD7BkJK5AMCPBtvjGnn+KI77d1YKQMQU1FxHEQckYP44vvTTB3G+yPcFWtsOKvd+TLfi5CMeMKuKphicXY2ZDw==
MIME-Version: 1.0
X-Received: by 10.28.146.202 with SMTP id u193mr31068160wmd.82.1458144427939; Wed, 16 Mar 2016 09:07:07 -0700 (PDT)
In-Reply-To: <56E75B3E.7020102@farance.com>
References: <56E6F25A DOT 7070000 AT gmx DOT de> <56E75B3E DOT 7020102 AT farance DOT com>
Date: Wed, 16 Mar 2016 12:07:07 -0400
Message-ID: <CAD8GWstL-rUm9=q8tpReiiHm8Tmm94Caq7jQyszZ02Tw=EN_TQ@mail.gmail.com>
Subject: Re: ctrl-c doesn't reliably kill ping
From: Lee <ler762 AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

Hi,

On 3/14/16, Frank Farance wrote:
> I have been having this problem with "ping".  If I "ping" a location that
> doesn't exist, then "ping" just hangs and cannot be killed via "kill -KILL
> [pid]".
>
> A little digression, so you understand the background ... The workstation I
> am
> doing this from is connected to a Verizon router to their FIOS network.  Now
> the
> reason I mention this is that the router's DNS (via DHCP to my workstation)
> is
> 192.168.1.1, which I presume is forwarded from the router upstream to
> Verizon's
> DNS caches.  So if I type the URL http://something.that.doesnt.exist in my
> browser, rather than getting a Hostname Not Found error (at the name
> resolution
> level), it actually loads up a page saying "something.that.doesnt.exist"
> isn't
> found and then I have a Yahoo set of search results on things matching the
> broken hostname.
>
> So all of this is normal ISP stuff: they actually resolve unknown addresses
> to
> their own website (which is 90.242.140.21).

Right.  If you poke around on the Verizon site long enough you'll find
where they list the resolvers that return NXDOMAIN instead of the
address of their ad site.   & sorry, no, I didn't save the url, but
try changing the last octet of the resolver addresses on your fios
router to .14 & see if that works.


> Ok, ending the digression ....
>
> Back to the problem, so when I type
>
> $ ping some.unknown.host
>
> according to "ping", the hostname resolves to 90.242.140.21 (as per the
> explanation above), but I cannot kill "ping".  I tried "ping" with a limited
>
> packet size and count so, in theory, "ping" would die on its own after 10
> packets, such as:
>
> $ ping some.unknown.host 50 10
>
> but it still hangs rather than timing out.  If I ping to some actual IP
> address
> that is unresponsive (route-able to the last subnet, but dies on the floor
> at
> the end), then I can kill via ctrl-c.  My only solution to the hanging
> "ping" is
> to kill the terminal window.
>
> Any suggestions on:
>
> - Why "ping" behaves this way?
> - How to avoid this problem?

The last time I tried the cygwin ping program it didn't return a
failure status - ie
ping whatever
and $? was always 0 -- so it's basically useless.   I'd suggest you
use the windows version of ping:

$ which ping
/cygdrive/c/windows/system32/ping

$ ping www.examle.com

Pinging www.examle.com [69.172.201.208] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 69.172.201.208:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

$ echo $?
1

$ ping does-not-exist.example.com.
Ping request could not find host does-not-exist.example.com.. Please
check the name and try again.

$ echo $?
1

$ ping www.google.com.

Pinging www.google.com [74.125.196.105] with 32 bytes of data:
Reply from 74.125.196.105: bytes=32 time=19ms TTL=45
Reply from 74.125.196.105: bytes=32 time=21ms TTL=45
Reply from 74.125.196.105: bytes=32 time=23ms TTL=45
Reply from 74.125.196.105: bytes=32 time=22ms TTL=45

Ping statistics for 74.125.196.105:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 19ms, Maximum = 23ms, Average = 21ms

$ echo $?
0


Regards,
Lee

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019