|
POSIX message queues(Solaris) to SYS V message queues(Linux)
Hi there.
i m porting a solaris application to Linux and
i encountered appli using POSIX message queues ..
since right now linux dont support POSIX one.. I ended to port to SYSV messsage queues.
Here is breif complaint funcitons
Abstract Operations on a Message Queue
Operation POSIX Function SVR5 Function
Gain access to a queue,
creating it if it does not exist.
mq_open(3) msgget(2)
Query attributes of a queue and
number of pending messages.
mq_getattr(3) msgctl(2)
Change attributes of a queue.
mq_setattr(3) msgctl(2)
Give up access to a queue.
mq_close(3) n.a.
Remove a queue from the system.
mq_unlink(3), rm(1) msgctl(2), ipcrm(1)
Send a message to a queue.
mq_send(3) msgsnd(2)
Receive a message from a queue.
mq_receive(3) msgrcv(2)
Request asynchronous notification
of a message arriving at a queue.
mq_notify(3) n.a.
Problem is.
1. How can I port mq_close() to Linux sysv ?
2 Is there any way to check by sys call or command
that some process has access to queue before calling
msgctl( key, IPC_RMID, NULL)
-thanks
-Kotrappa.
|