Conflated ping issues

Aaron Schneider notstop2@users.sourceforge.net
Thu Jan 3 17:21:00 GMT 2013


On 03/01/2013 18:07, David McAllister wrote:
> Hi. I have three machines that all run Win 7 x64 and all have updated
> Cygwin installs. I thought I installed them all the same, but I'm
> getting two differences, both centered around the ping command.
>
> Machine 1 doesn't have /usr/bin/ping.exe, so it uses Windows PING.EXE:
>> which ping
> /cygdrive/c/Windows/system32/ping
> I type "ping" and it runs PING.EXE and succeeds.
> Machine 2 had /usr/bin/ping.exe, but when I run it I get
> ping: socket: operation not permitted.
> So I found a thread about that not working unless you have admin
> priviliges, so I deleted /usr/bin/ping.exe in favor of Windows
> PING.EXE and rehashed.
> However, on this machine it doesn't map "ping" to "PING", like it does
> on the other machine. If I type "PING" it successfully runs Windows
> PING.
> Machine 3 has /usr/bin/ping.exe and when I type "ping" it runs it
> successfully. I didn't do anything special when launching mintty or
> tcsh to put it in administrator mode.
>
> I am an administrator on all three machines.
> a) What makes one machine case insensitive to DOS commands and the
> other sensitive?
> b) What makes one machine succeed with Cygwin ping and the other not,
> when I'm an admin on both?

Do you have the package ping on any of the machines?
http://cygwin.com/cgi-bin2/package-cat.cgi?file=ping%2Fping-1.0-1&grep=ping.exe

If you see your $PATH, you will see that /usr/bin and /usr/local/bin go 
first, so if you have ping or ping.exe in there that will be executed. 
If don't, it will go down dir by dir until found (if).

So if you install ping from cygwin package you are giving preference to it.

Since in windows executables can be called 'yourbin' or 'yourbin.exe' 
both work, and the same for upper/lowercase. If you run MOUNT or Mount 
it will run the cygwin version as well.

About the socket problem, no idea.


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



More information about the Cygwin mailing list