Unable to unlink shared memory

Hi all,
after creating shared memory i am unable 2 unlink shared memory.
after opening i called write routine & is successfull in writing 2 port.
but not able to close shared memory. After calling close(fd), i am calling shm_unlink…& i am passing correct argumnet also.
please let me know the answer.

Thanx & regards
rani

Post your code ,there has to be something wrong in it ;-)

hi,
as u suggested i went through code & there was an error … Thnax 4 ur reply…
i want one more thing to be clarified…
i want mutex to be in shared memory. When i access that shared memory by 2 diff processes that mutex id should b same. but i am getting 2 diff mutex ids. Is it not possible 2 get same mutex id for both processes? please help me in this regard
thanx & regards
rani

What do you mean by Mutex Id? Mutex are not access by Id but rather by reference (memory address).

Also make sure you set the share attribute of the mutex to PTHREAD_PROCESS_SHARE