What does errno 91 (ENOMSG) mean?

 
Could be also:
ConstantTypeOS
EPROTOTYPEerrnoLinux
ERESTARTerrnoSolaris
SET_ENV_VAR_FAILEDBugCheck CodeWindows
Previous Next
EPROTOTYPE ERESTART

ENOMSG

An empty match is different from a missing queue

ENOMSG is associated with message-queue semantics where the queue exists but no message of the requested type or selection is currently available. It does not mean that the sender is permanently absent, and it does not establish that the queue identifier was invalid.

The caller should preserve the selection criteria in diagnostics: queue ID, requested type, nonblocking mode, and current queue depth if available. Changing a type filter merely to make the error disappear can consume a message intended for another consumer.

How to reason about retries

  • Use the queue’s normal notification or blocking mechanism when waiting is allowed; do not poll tightly.
  • Record whether the receive was nonblocking and whether type-based selection was requested.
  • Separate ENOMSG from EIDRM: the former describes no matching message, the latter an object removed during its lifetime.

References


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