http://www.embedu.org/Column/Column616.htm
http://baike.baidu.com/view/3170880.htm
IPC_PRIVATE创建新的IPC结构(作为msgget,semget,shmget的参数),如果要访问一个现存队列,则不能用IPC_PRIVATE作为键
key_t ftok(const char *pathname, int proj_id);The ftok() function uses the identity of the file named by the given
pathname ( which must refer to an existing, accessible file)。
ftok使用文件名+id(只取低8位),生成一个键值, 于是,两个通信的进程, 用同一个路径名调用ftok, 于是得到同一个key。