Linux msgget return no space left
The first thing to say is that such standard functions should form a habit of looking at the man manual to understand its usage and return values.
Return no space left is divided into two cases:
1, the number of MSG queue created exceeds the entire system limit, by ipcs-l to see the specific number of system-to-MSG queue restrictions, through ipcs-q to view all the message queues that are currently created. This is the case in my own right, because the executable program exits without destroying the MSG queue that has been created , causing the upper limit to be successfully created after repeated multiple runs.
Note that for the object that can be used for process communication, the system resource is not automatically destroyed when the process exits, so remember to manually destroy it, and CTRL + C will cause this resource not to be released normally.
2, the number of system inode is exhausted, the current inode usage can be viewed by df-i.
Linux msgget return no space left