From: Dave Thomas Date: 2003-05-15T12:26:57+09:00 Subject: Re: ping.rb Ryan Davis wrote: >> On my Mac OSX, >> >> TCPSocket.new('localhost', 'echo') > >> raises EINVAL: >> >> This breaks ping.rb, which seems to assume it will be seeing >> ECONNREFUSED. This means that pingecho('localhost') returns false on >> my box. >> > > I think this is valid per default mac os x setup: > > <497> telnet localhost echo > Trying ::1... > telnet: connect to address ::1: Connection refused > Trying 127.0.0.1... > telnet: connect to address 127.0.0.1: Connection refused > telnet: Unable to connect to remote host Yes - but 'connection refused' should generate ECONNREFUSED, which is handled specially inside ping.rb. Instead it seems to be generating EINVAL. Cheers Dave