public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Marco Atzeri <marco.atzeri@gmail.com>
To: cygwin@cygwin.com
Subject: Re: ctrl-c doesn't reliably kill ping
Date: Wed, 16 Mar 2016 13:25:00 -0000	[thread overview]
Message-ID: <56E95EA2.8070800@gmail.com> (raw)
In-Reply-To: <56E75B3E.7020102@farance.com>



On 15/03/2016 01:45, 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]".
>
>
> Back to the problem, so when I type
>
> $ ping some.unknown.host
>

I do not succeed to replicate.
CTRL-C works fine for me

$ type ping
ping is hashed (/usr/bin/ping)

$ ping 172.21.1.254
PING 172.21.1.254 (172.21.1.254): 56 data bytes

----172.21.1.254 PING Statistics----
4 packets transmitted, 0 packets received, 100.0% packet loss

or I have not a biased DNS answer.

> 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?
>
> Thanks, in advance.

cygwin ping is based on very old source from a time where people was not
cheating on protocol answer.

http://ftp.arl.mil/mike/ping.html
(the author passed away 16 years ago..)

can you send me a strace to see where the program is stacking ?
No promise to find a solution but I will look on it.

Regards
Marco





--
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

  parent reply	other threads:[~2016-03-16 13:25 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14 17:18 ctrl-c doesn't reliably kill applications Björn Stabel
2016-03-14 23:39 ` Kaz Kylheku
2016-03-15  0:46 ` ctrl-c doesn't reliably kill ping Frank Farance
2016-03-15 11:05   ` Andrey Repin
2016-03-15 11:43     ` Adam Dinwoodie
2016-03-16 14:46       ` cyg Simple
2016-03-16  4:56     ` Kaz Kylheku
2016-03-16 11:50       ` Andrey Repin
2016-03-16 14:51       ` cyg Simple
2016-03-16 15:57         ` Michael Enright
2016-03-16 17:33           ` Kaz Kylheku
2016-03-16 18:10             ` Lee
2016-03-17 21:10               ` Frank Farance
2016-03-17 21:29                 ` Marco Atzeri
2016-03-15 15:13   ` Warren Young
2016-03-16 13:25   ` Marco Atzeri [this message]
2016-03-17 20:04     ` ctrl-c doesn't reliably kill applications Björn Stabel
2016-04-18 21:38       ` Aaron Digulla
2016-04-19  9:13         ` Corinna Vinschen
2016-04-19 16:30           ` Aaron Digulla
2016-03-16 16:07   ` ctrl-c doesn't reliably kill ping Lee
2016-03-16 16:50     ` Warren Young
2016-03-16 17:52       ` Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56E95EA2.8070800@gmail.com \
    --to=marco.atzeri@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).