What does errno 121 (ENOLINK) in Windows mean?

 
Could be also:
ConstantTypeOS
ERROR_SEM_TIMEOUTWin32 errorWindows
EREMOTEIOerrnoLinux
ESOCKTNOSUPPORTerrnoSolaris
MISMATCHED_HALBugCheck CodeWindows
Previous Next
ESOCKTNOSUPPORT EOPNOTSUPP

ENOLINK

This page examines UCRT compatibility status: link unavailable. The Microsoft C runtime exposed the POSIX-supplement ENOLINK value for a link-related compatibility condition.

Historical and API context

Microsoft C runtime compatibility: Ucrt compatibility status: link unavailable is exposed by the Microsoft CRT compatibility layer. _doserrno and the immediately preceding CRT call can preserve the Win32 or runtime condition summarized by errno. The wording attached to ENOLINK is a clue to the original interface, not proof that a similarly named modern subsystem returned it.

Reconstruct the returning call

EvidenceQuestion it answers
CRT API, errno and _doserrno pair, pathname or endpoint, and runtime build.Ties this error to one live API object instead of a translated message.
Thread-local errno captured before another CRT call changes it.Shows whether this error arose in the caller ABI, wrapper, or provider.
Paired Win32 handle/socket state and the actual CRT descriptor conversion.Preserves the first boundary before errno can be overwritten.
Known-good call using the same UCRT build and calling convention.Provides a same-platform known-good comparison.

A small reproduction

  1. Repeat against a known available link/endpoint. Keep the binary, header ABI, and provider fixed.
  2. Log errno with _get_errno and _doserrno at the immediate failure site. Record whether the control reaches the same syscall or runtime boundary as this error.
  3. Verify the numeric value against the target UCRT header rather than a Unix table. A changed errno after this test is a new boundary, not another spelling of this error.

Two observations are especially discriminating here: CRT API, errno and _doserrno pair, pathname or endpoint, and runtime build. Use this control for comparison: repeat against a known available link/endpoint.

Portability traps

Tempting assumptionSafer interpretation
The English phrase is assumed to be portableENOLINK belongs to Microsoft C runtime compatibility; verify the target headers and returning API before applying another platform's errno table
A retry succeeded and erased the original evidenceA retry can replace the original errno with a different state; preserve the first call, numeric value, and object generation beforehand

Correction and acceptance

Targeted correction. Repair the underlying link indicated by _doserrno or handle the compatibility condition explicitly.

Regression proof. The working link succeeds and the unavailable control maps consistently.

Technical references


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