With glibc-devel-2.1.2-11 installed, /usr/include/bits/ipc.h kefines the key member of struct ipc_perm incorrectly: struct ipc_perm { __key_t __key; /* Key. */ unsigned short int uid; /* Owner's user ID. */ unsigned short int gid; /* Owner's group ID. */ unsigned short int cuid; /* Creator's user ID. */ unsigned short int cgid; /* Creator's group ID. */ unsigned short int mode; /* Read/write permission. */ unsigned short int __seq; /* Sequence number. */ }; key should simply be defined as 'key' not '__key'
assign to jakub
No, it should not. X/Open (1987/01) does not define such members of struct ipc_perm. Look at util-linux/sys-utils/ipcs.c to see how ipcs does this.