问个关于共享内存的问题,谢谢
函数:shmget(key_t,key,size_t size,int flag),这个函数它的键值key,与它的返回值ID有什么联系与区别?为什么不直接返回它的键值key呢?
[解决办法]
The identifier is an internal name for an IPC object. Cooperating processes need an external naming scheme to be able to rendezvous using the same IPC object. For this purpose, an IPC object is associated with a key that acts as an external name.
[解决办法]
KEY 是一个东西的客观描述
描述符 是这个东西的主观印象