This is the mail archive of the
mailing list for the Cygwin project.
Re: ctrl-c doesn't reliably kill ping
- From: Marco Atzeri <marco dot atzeri at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 16 Mar 2016 14:24:50 +0100
- Subject: Re: ctrl-c doesn't reliably kill ping
- Authentication-results: sourceware.org; auth=none
- References: <56E6F25A dot 7070000 at gmx dot de> <56E75B3E dot 7020102 at farance dot 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 188.8.131.52 (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.
(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.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple