Bind man page does not document EADDRINUSE, does document ENOENT

Bug #46708 reported by Daniel Robitaille
6
Affects Status Importance Assigned to Milestone
manpages (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: manpages-dev

bug initially reported using reportbug

---------- Forwarded message ----------
From: Rusty Russell <email address hidden>
To: Ubuntu Bug Tracking System <email address hidden>
Date: Wed, 24 May 2006 15:24:03 +1000
Subject: manpages-dev: Bind man page does not document EADDRINUSE, does document ENOENT
Package: manpages-dev
Version: 2.17-1
Severity: normal

bind() lists AF_UNIX error codes, but doesn't list EADDRINUSE (unix(7)
does). It lists ENOENT, which I'm not sure can ever happen?

-- System Information:
Debian Release: testing/unstable
 APT prefers dapper
 APT policy: (500, 'dapper')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-22-386
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages manpages-dev depends on:
ii manpages 2.17-1 Manual pages about using a GNU/Lin

manpages-dev recommends no packages.

-- no debconf information

Revision history for this message
Dennis Kaarsemaker (dennis) wrote : Re: [Bug 46708] Bind man page does not document EADDRINUSE, does document ENOENT

> It lists ENOENT, which I'm not sure can ever happen?

It can, with AF_UNIX sockets.

Revision history for this message
Rusty Russell (rusty-rustcorp) wrote : Re: [Bug 46708] Re: [Bug 46708] Bind man page does not document EADDRINUSE, does document ENOENT

On Fri, 2006-05-26 at 09:47 +0000, Dennis Kaarsemaker wrote:
> > It lists ENOENT, which I'm not sure can ever happen?
>
> It can, with AF_UNIX sockets.

Sorry, how?

Rusty.
--
 ccontrol: http://ccontrol.ozlabs.org

Revision history for this message
Dennis Kaarsemaker (dennis) wrote : Re: [Bug 46708] Re: [Bug 46708] Re: [Bug 46708] Bind man page does not document EADDRINUSE, does document ENOENT

dennis@mirage:~$ cat foo.c
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>

int main() {
    int s, r;
    struct sockaddr_un a = { AF_UNIX, "/tmp/foo/bar" }; // Non-existent path
    s = socket(PF_UNIX,SOCK_STREAM,0);
    r = bind(s,(struct sockaddr *)(&a),sizeof(a));
    printf("%d %d %d\n", s, r, errno);
    printf("%s\n", strerror(errno));
}
dennis@mirage:~$ gcc -o foo foo.c
dennis@mirage:~$ ./foo
3 -1 2
No such file or directory

Revision history for this message
Rusty Russell (rusty-rustcorp) wrote : Re: [Bug 46708] Re: [Bug 46708] Re: [Bug 46708] Re: [Bug 46708] Bind man page does not document EADDRINUSE, does document ENOENT

On Sat, 2006-05-27 at 10:20 +0000, Dennis Kaarsemaker wrote:
> dennis@mirage:~$ cat foo.c

Ah, non-existent dir in path. Makes sense, thanks!

Rusty.
--
 ccontrol: http://ccontrol.ozlabs.org

Revision history for this message
Sebastien Bacher (seb128) wrote :

EADDRINUSE is liste in the gutsy version

Changed in manpages:
importance: Medium → Low
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.