Red Hat Bugzilla – Bug 198179
Should display semaphore key in hex
Last modified: 2007-11-30 17:11:37 EST
semget(4711, 12, IPC_CREAT|0666) = 65538
Above is a line from the strace of a program that creates a semaphore set.
# ipcrm -s 4711
ipcrm: invalid id (4711)
I now try to remove the semaphore with the above ipcrm command and get a
failure because ipcrm takes a hex number.
# ipcs -s
------ Semaphore Arrays --------
key semid owner perms nsems
0x00001267 131075 1000 666 12
Now I run the ipcs command and again get the key in hex.
I believe that it should be possible to directly take the output of strace
calling semget(), paste it in to ipcrm, and compare it to the output of ipcs.
That means that either ipcrm and ipcs should have an option to use decimal, or
strace should be modified to use hex when reporting semaphore IDs.
Please re-assign this bug to util-linux if you think that ipcs and ipcrm
should be changed instead.
I changed strace upstream to display key_t values in hex.
these bugs are fixed upstream in the coming 4.5.15 release
4.5.15 in rawhide and in updates for fc5 and fc6 fixes this.