Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Aug 2003 13:37:55 +0200
From:      Jens Schweikhardt <schweikh@schweikhardt.net>
To:        Diomidis Spinellis <dds@aueb.gr>
Cc:        freebsd-standards@freebsd.org
Subject:   Re: POSIX conformance
Message-ID:  <20030806113755.GA26410@schweikhardt.net>
In-Reply-To: <3F30B724.5E0ED74E@aueb.gr>
References:  <3F30B724.5E0ED74E@aueb.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
Diomidis et al (freebsd-standards),

On Wed, Aug 06, 2003 at 11:07:00AM +0300, Diomidis Spinellis wrote:
# I was about to MFC the enclosed patch, but decided to check POSIX on
# that.

There was no patch attached...

# According to POSIX
# <http://www.opengroup.org/onlinepubs/007904975/functions/connect.html>;
# 
# The connect() function may fail if:
# 
# [EACCES] Search permission is denied for a component of the path prefix;
# or write access to the named socket is denied. 
# 
# I also document the current FeeBSD behavior:
# 
# [EACCES] An attempt is made to connect to a broadcast address (obtained
# through the INADDR_BROADCAST constant or the INADDR_NONE return value)
# through a socket that does not provide broadcast functionality.
# 
# Given that this is outside the POSIX spec, should we perhaps modify the
# errno value (to what?), rather than the documentation?  I checked the
# other errno values and they are mostly following the spec, appart from
# EFAULT, which POSIX does not include.  How strict are we regarding POSIX
# conformance?

Returning [EACCESS] for other reasons is fine with POSIX:

 Error Numbers
 ...
 Implementations may support additional errors not included in this
 list, may generate errors included in this list under circumstances
 other than those described here, or may contain extensions or
 limitations that prevent some errors from occurring. The ERRORS section
 on each reference page specifies whether an error shall be returned, or
 whether it may be returned. Implementations shall not generate a
 different error number from the ones described here for error
 conditions described in this volume of IEEE Std 1003.1-2001, but may
 generate additional errors unless explicitly disallowed for a
 particular function.


Regards,

	Jens
-- 
Jens Schweikhardt http://www.schweikhardt.net/
SIGSIG -- signature too long (core dumped)



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