Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jan 2001 23:11:54 -0800 (PST)
From:      "Ronald F. Guilmette" <rfg@monkeys.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   docs/24125: connect(2) can yield EWOULDBLOCK/EAGAIN
Message-ID:  <200101070711.f077BsU57011@mail.monkeys.com>

next in thread | raw e-mail | index | archive | help

>Number:         24125
>Category:       docs
>Synopsis:       connect(2) can yield EWOULDBLOCK/EAGAIN
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 06 23:30:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Ronald F. Guilmette
>Release:        FreeBSD 4.2-RELEASE i386
>Organization:
Infinite Monkeys & Co.
>Environment:

>Description:

	It appears that the connect(2) function can yield a -1 (error)
	result and can set errno to EAGAIN/EWOULDBLOCK in some cases
	when trying to connect sockets that have previously been marked
	as non-blocking.

	Note however that the man page for connect(2) documents no such
	possibility.

	Given that the text associated with EAGAIN is "Resource temporarily
	unavailable" it is clear that some resource is being used up, but
	I have no idea which one or even how to find out which one.  I *am*
	using quite a lot of sockets in the relevant program, but still,
	it is both annoying and troublesome to be getting an undocumented
	errno result from connect(2) and not even have it be clear which
	resource limitation is causing this.

>How-To-Repeat:

	Sorry, but I do not have any nice simple program which can demon-
	strate this problem at the moment... only a rather large application
	program.  But if you need a small example program which triggers
	the problem (i.e. the undocumented EAGAIN errno result), let me
	know and I will try to cook one up.

>Fix:

	For the resource limitation:  None known.

	For the documentation problem:  Fix the ERRORS section of the
	connect(2) man page so that it includes EAGAIN and so that it
	specifies what resource limitations might cause this result.

>Release-Note:
>Audit-Trail:
>Unformatted:


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




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