Bug 198179 - Should display semaphore key in hex
Summary: Should display semaphore key in hex
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: strace
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: 198182
TreeView+ depends on / blocked
 
Reported: 2006-07-10 13:07 UTC by Russell Coker
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 4.5.15-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-17 03:06:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Russell Coker 2006-07-10 13:07:37 UTC
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 07:27:50 UTC
I changed strace upstream to display key_t values in hex.

Comment 2 Roland McGrath 2007-01-11 11:15:13 UTC
these bugs are fixed upstream in the coming 4.5.15 release

Comment 3 Roland McGrath 2007-01-17 03:06:28 UTC
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.