Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Mar 1999 13:08:33 +0200
From:      Ladavac Marino <mladavac@metropolitan.at>
To:        'Graham Wheeler' <gram@cdsec.com>, hackers@freebsd.org
Subject:   RE: select() on UDP socket returns ECONNREFUSED
Message-ID:  <97A8CA5BF490D211A94F0000F6C2E55D097583@s-lmh-wi-900.corpnet.at>

next in thread | raw e-mail | index | archive | help
> -----Original Message-----
> From:	Graham Wheeler [SMTP:gram@cdsec.com]
> Sent:	Wednesday, March 31, 1999 12:09 PM
> To:	hackers@freebsd.org
> Subject:	select() on UDP socket returns ECONNREFUSED
> 
> Hi all
> 
> Does anyone know what this means? The source code for select is buried
> in some non-obvious place so I haven't been able to check it directly.
	[ML]  I don't parse this.

	Do you mean, select returns -1 and sets errno to ECONNREFUSED?

	You know that you should not evaluate errno unless the last
operation failed (a successful operation does not clear errno).

	BTW, the behavior might be correct if you have had a
non-blocking connect and it failed.  Select then marked the file
descriptor readable (select for write on a non blocking connect does not
seem to work as advertised in the manpage) and the subsequent read fails
with ECONNREFUSED.  Please note that failure of a non blocking connect
can be reported only on the first use of the descriptor after the state
of the descriptor is no longer EINPROGRESS.

	/Marino

> TIA
> gram
> -- 
> Dr Graham Wheeler                          E-mail: gram@cdsec.com
> Citadel Data Security                      Phone:  +27(21)423-6065/6/7
> Firewalls/Virtual Private Networks         Fax:    +27(21)24-3656
> Internet/Intranet Network Specialists      
> Data Security Products                     WWW:
> http://www.cdsec.com/
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?97A8CA5BF490D211A94F0000F6C2E55D097583>