use same library, other result currupt..

F

fallleaf

i make library, this library function is create circula-queue in shared
memory and attach, queue put, queue get, etc...

sample program make,
1 sample program use library, test make queue in shared memory.
2 sample program use library, test attach queue in shared memory which
created 1 sample program.
result is success.

Then A program use this library, and B program use this library.

A program is create queue in shared memory use library.
B program is attach queue in shared memory which created by A program.
result is shmget fail. - fail reason(Invalid parameter)

so,
ipcs -a typing, and then, not same SEGSZ.
library is always make same size queue in shared memory.

what can i solve this problem??? T^T
 
I

Ian Collins

fallleaf said:
i make library, this library function is create circula-queue in shared
memory and attach, queue put, queue get, etc...

sample program make,
1 sample program use library, test make queue in shared memory.
2 sample program use library, test attach queue in shared memory which
created 1 sample program.
result is success.

Then A program use this library, and B program use this library.

A program is create queue in shared memory use library.
B program is attach queue in shared memory which created by A program.
result is shmget fail. - fail reason(Invalid parameter)

so,
ipcs -a typing, and then, not same SEGSZ.
library is always make same size queue in shared memory.

what can i solve this problem??? T^T
Try comp.unix.programmer and add some of your code, including the
parameters you are passing to shmget/shmat.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top