Linux/Unix defines plenty of relatively similar error codes. Are there any commonly followed conventions suggesting what types of errors should be bound to which error codes?
Let's say my function has some arbitrary container with fixed size (and can't be resized for arbitrary reasons not related to actual RAM usage). If code tries to push too many objects into containers should I rather return ENOMEM or ENOSPC? Is ENOSPC solely dedicated to persistent storage devices space or something like that?