Project

General

Profile

Actions

Bug #395

closed

AF_UNIX: socket creation/removal semantics seem muddy

Added by Anonymous over 18 years ago. Updated about 16 years ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
-
ASK QUESTIONS IN Forums:

Description

When binding lighttpd to an AF_UNIX socket, lighttpd gives the following error if the socket file already exists:


2005-11-29 15:28:50: (network.c.265) can't bind to port 80 Address already in use

If the socket does not exist, lighttpd creates it. However, on a graceful shutdown, lighttpd does not remove the socket, with the result that the server cannot be restarted without intermediate action (removing the socket manually).

My expectations would be as follows:

o When told to bind to an AF_UNIX socket, lighttpd creates the socket on start-up.
o If the socket file already exists, lighttpd either automatically unlinks it and creates a new one, or exits with an accurate error message.
o On shutdown, lighttpd unlinks the socket file.

This is in reference to lighttpd 1.4.8 with the stock config file (except for server.bind) under FreeBSD 4.11.

-- chad

Actions #1

Updated by jan over 18 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

fixed in changeset r946.

Actions #2

Updated by Anonymous over 17 years ago

Same problem here on PC-BSD:


PCBSD# lighttpd -f /etc/lighttpd/lighttpd.conf start
2006-09-17 22:48:44: (network.c.300) can't bind to port:  80 Address already in use
PCBSD# lighttpd -f /etc/lighttpd/lighttpd.conf restart
2006-09-17 22:48:51: (network.c.300) can't bind to port:  80 Address already in use
PCBSD#
Actions

Also available in: Atom