I have encountered an issue using System V IPC and ftok. I have two files in my /tmp/ dir with inodes 0x70007 and 0x1370007. When call ftok on these two files I am obtaining the same 32 bit key_t value. This results in collisions when two unique process using different files try to obtain SysV IPC objects using ftok(). Should key_t be only a 32 integer? I can not find any documentation on 'standard' practice to recover from this problem so I assume it just may be a bug?
That's why those interfaces got replaced by something better. There is no way to avoid duplicates.
My understanding is the ftok returns a 'key_t' ... i don't know the standard very well ... but I assume it does not dictate an int32 be used for 'key_t'?