What does errno 100 (EADDRINUSE) mean?

 
Could be also:
ConstantTypeOS
ERROR_TOO_MANY_SEMAPHORESWin32 errorWindows
HTTP_STATUS_CONTINUEHTTP CodeAny
ENETDOWNerrnoLinux
EPROTOerrnoMac
SYMBOLIC_INITIALIZATION_FAILEDBugCheck CodeWindows
Previous Next
EPROTO ENETUNREACH

EADDRINUSE

EADDRINUSE is the POSIX-style name for a local-address collision. In a socket context, the conflicting identity is not just a port number: it includes address family, local IP address or wildcard binding, port, protocol, and reuse policy. A listener on one specific address may coexist with another listener on the same port under conditions where a wildcard listener cannot.

This entry is a UCRT POSIX-supplement macro. Native Winsock code normally receives WSAEADDRINUSE from WSAGetLastError(), not EADDRINUSE. Preserve that native status when diagnosing a real socket failure; a wrapper may map it later for portability.

What distinguishes the common cases

  • Capture the intended sockaddr, address family, socket type, protocol, and every reuse option before bind or connect.
  • Check wildcard versus specific-address conflicts, dual-stack IPv6 behavior, and whether another process or service owns the endpoint.
  • For a quick restart, inspect the prior process's shutdown path and active connections before adding reuse options; those options alter ownership rules and are not interchangeable.
  • Do not infer the owner from a port scan alone. The local IP address and transport protocol are part of the collision.

References


Looking for a different code? Search another status or error code.