Site icon EfmSoft

What does errno 38 (ENOTSOCK) mean?

 
Could be also:
ConstantTypeOS
ERROR_HANDLE_EOFWin32 errorWindows
KERN_LOCK_SET_DESTROYEDKern returnMac
ippStsSymKernelExpectedIntel Ipp StatusAny
ENOSYSerrnoLinux
EL2NSYNCerrnoSolaris
ENAMETOOLONGerrnoWindows
CDFS_FILE_SYSTEMBugCheck CodeWindows
Previous Next
ENOSYS EL2NSYNC

ENOTSOCK

The descriptor is valid only as a number

ENOTSOCK means that the argument passed to a socket API does not refer to a socket object. It is not a network reachability error and it does not identify a remote endpoint. The failure is local to descriptor ownership, lifetime, or API selection.

A common diagnostic trap is to log only the integer descriptor. After one thread closes it, the kernel may reuse the same number for an unrelated file. A delayed callback can then call send(), connect(), or shutdown() on the wrong object and obtain ENOTSOCK.

Evidence to collect

Why reconnecting does not address it

Creating another network connection may hide the race temporarily, but it cannot repair a call that used a non-socket descriptor. The defect is in local resource ownership or in choosing a socket API for a different kind of file descriptor.

References


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

Exit mobile version