NetBSD Problem Report #46150

From  Wed Mar  7 07:13:29 2012
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id 81AE063E21C
	for <>; Wed,  7 Mar 2012 07:13:29 +0000 (UTC)
Message-Id: <20120307071329.712C356C9@marx.bitnet>
Date: Wed,  7 Mar 2012 09:13:29 +0200 (EET)
From: Jukka Ruohonen <>
Sender: a b <>
Subject: Wrong errno from listen(2)
X-Send-Pr-Version: 3.95

>Number:         46150
>Category:       standards
>Synopsis:       Wrong errno from listen(2)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    standards-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 07 07:15:00 +0000 2012
>Closed-Date:    Sat Mar 17 08:49:29 +0000 2012
>Last-Modified:  Sat Mar 17 08:49:29 +0000 2012
>Originator:     Jukka Ruohonen
>Release:        NetBSD 5.1_STABLE - NetBSD 6.0 BETA
Architecture: i386
Machine: i386


According to IEEE Std 1003.1-2008, if a socket is already connected,
a call to listen(2) should fail with EINVAL, like it does on Linux. But on
NetBSD the call fails with EOPNOTSUPP.

Note that while this seems (and is) a trivial issue, some third-party
software (mainly programming languages) seem to rely on correct errors from
the networking functions.

Related PRs:

	PR kern/22522: connect(2) may fail with EINVAL
	PR kern/46077: fstat() returns EINVAL


A test case will follow.


Not investigated.



State-Changed-From-To: open->closed
State-Changed-When: Sat, 17 Mar 2012 08:49:29 +0000


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.