Bug 198179 - Should display semaphore key in hex
Should display semaphore key in hex
Product: Fedora
Classification: Fedora
Component: strace (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Roland McGrath
Brian Brock
Depends On:
Blocks: 198182
  Show dependency treegraph
Reported: 2006-07-10 09:07 EDT by Russell Coker
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 4.5.15-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-01-16 22:06:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Russell Coker 2006-07-10 09:07:37 EDT
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.
Comment 1 Roland McGrath 2006-08-22 03:27:50 EDT
I changed strace upstream to display key_t values in hex.
Comment 2 Roland McGrath 2007-01-11 06:15:13 EST
these bugs are fixed upstream in the coming 4.5.15 release
Comment 3 Roland McGrath 2007-01-16 22:06:28 EST
4.5.15 in rawhide and in updates for fc5 and fc6 fixes this.

Note You need to log in before you can comment on or make changes to this bug.