Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

msg_get_queue(3) [php man page]

MSG_GET_QUEUE(3)							 1							  MSG_GET_QUEUE(3)

msg_get_queue - Create or attach to a message queue

SYNOPSIS
resource msg_get_queue (int $key, [int $perms = 0666]) DESCRIPTION
msg_get_queue(3) returns an id that can be used to access the System V message queue with the given $key. The first call creates the mes- sage queue with the optional $perms. A second call to msg_get_queue(3) for the same $key will return a different message queue identifier, but both identifiers access the same underlying message queue. PARAMETERS
o $key - Message queue numeric ID o $perms - Queue permissions. Default to 0666. If the message queue already exists, the $perms will be ignored. RETURN VALUES
Returns a resource handle that can be used to access the System V message queue. SEE ALSO
msg_remove_queue(3), msg_receive(3), msg_send(3), msg_stat_queue(3), msg_set_queue(3). PHP Documentation Group MSG_GET_QUEUE(3)

Check Out this Related Man Page

MSG_SEND(3)								 1							       MSG_SEND(3)

msg_send - Send a message to a message queue

SYNOPSIS
bool msg_send (resource $queue, int $msgtype, mixed $message, [bool $serialize = true], [bool $blocking = true], [int &$errorcode]) DESCRIPTION
msg_send(3) sends a $message of type $msgtype (which MUST be greater than 0) to the message queue specified by $queue. PARAMETERS
o $queue - o $msgtype - o $message - o $serialize - The optional $serialize controls how the $message is sent. $serialize defaults to TRUE which means that the $message is serial- ized using the same mechanism as the session module before being sent to the queue. This allows complex arrays and objects to be sent to other PHP scripts, or if you are using the WDDX serializer, to any WDDX compatible client. o $blocking - If the message is too large to fit in the queue, your script will wait until another process reads messages from the queue and frees enough space for your message to be sent. This is called blocking; you can prevent blocking by setting the optional $block- ing parameter to FALSE, in which case msg_send(3) will immediately return FALSE if the message is too big for the queue, and set the optional $errorcode to MSG_EAGAIN, indicating that you should try to send your message again a little later on. o $errorcode - RETURN VALUES
Returns TRUE on success or FALSE on failure. Upon successful completion the message queue data structure is updated as follows: $msg_lspid is set to the process-ID of the calling process, $msg_qnum is incremented by 1 and $msg_stime is set to the current time. SEE ALSO
msg_remove_queue(3), msg_receive(3), msg_stat_queue(3), msg_set_queue(3). PHP Documentation Group MSG_SEND(3)
Man Page

14 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

queue is disabled

Does anyone know why I got this message when I tried to print my file on Unix? THANK YOU! (1 Reply)
Discussion started by: whatisthis
1 Replies

2. Programming

Message Queue Problem Again..

Is there any way one can delete , say , a particular message from a message queue on system V? (2 Replies)
Discussion started by: satansfury
2 Replies

3. IP Networking

hi friends

i have been in trouble please help me out i have developed a message queue.it is a simple message queue program after running it give error like NO SPACE LEFT ON DEVICE what is this error how could i solve this problem i am working on solaris9.2 (2 Replies)
Discussion started by: ramneek
2 Replies

4. Programming

Message Queue with fork() help

hi all... ive been trying this program where i spawn 4 threads... and i am trying to use message queue to send msgs from 3 of the threads to the parent thread... but it doent seem to be working... ive almost pulled out my hair tryin to fix the prob :confused: another wierd thing... (1 Reply)
Discussion started by: strider
1 Replies

5. Programming

message queue

Hello, i need to write a message queue "chat server", that should work only localy. Can anyone please help me with some ideas and peshaps code. I'm studying the UNIX IPC mechanisms right now. So far, i understand how it works but i still cannot get an idea how to write a chat programm... ... (2 Replies)
Discussion started by: etenv
2 Replies

6. Programming

regarding socket & mssage queue

hello , I have to write an application in which I had to implement both Socket Comminication and IPC- message queues. and that process should run in Infinite loop as well I had to continously check and send data through both type of communications... What should I use to implement it... I had... (34 Replies)
Discussion started by: arunchaudhary19
34 Replies

7. Shell Programming and Scripting

Help !!!!

perms=`ls -l "$1" | cut -f1` perms=${perms#?} for role in user group other; do what=none case $perms in r??*) what=read;; esac case $perms in ?w?*) what="$what"${what:+", "}"write";; esac case $perms in ??x*) what="$what"${what:+", "}"execute";; esac echo... (1 Reply)
Discussion started by: nadman123
1 Replies

8. AIX

How to display IPC limit on AIX?

Such as how to display these: number of message queue IDs : 4,096 bytes per message : 8,192 bytes per message queue : 65,536 messages per message queue : 8,192 (4 Replies)
Discussion started by: rainbow_bean
4 Replies

9. Programming

UNIX Message Queue

Hello !!!!! I have a simple question but i can't find the answer anywhere hope to meet it here. Why it is a bad idea to pass pointers through message queues ? Most structs i see all of their char types are arrays... Is it becase having pointers means we could possibily send wrong bytes ? For... (2 Replies)
Discussion started by: qlyine
2 Replies

10. Ubuntu

Message Queue in Linux

Hello How can I see the created message queues in the system? (4 Replies)
Discussion started by: xyzt
4 Replies

11. UNIX for Dummies Questions & Answers

IPC Message Queue. msgrcv doesnt work..

Hi everybody, this is the situation. there is a programm XYZ which opens a message queue with the key 47110815 and waits for a SIGUSR1. After receiving this signal it sends a message with type 100 and a number (as ASCII) in the message-body. I have to write a prog which frist sends the... (1 Reply)
Discussion started by: daredevil82m
1 Replies

12. Programming

Permission denied when creating message queue

Hi guys. i have wrote a simple program to test message queue attributes. here it is: #include <stdio.h> #include <stdlib.h> #include <mqueue.h> #include <fcntl.h> #include <string.h> #include <errno.h> #include <sys/stat.h> int main() { struct mq_attr attr; mqd_t mqd; ... (2 Replies)
Discussion started by: majid.merkava
2 Replies

13. Programming

Message queue is not blocked in msgsnd

Hi, I am trying to send/receive data by message queue and expecting it to be blocked on send/read for other side (at least this is my understooding ) , I am connecting message between perl<->C , perl is working as expected , but in C msgsnd and msgrcv are not waiting (blocked) untill second side... (6 Replies)
Discussion started by: alexse
6 Replies

14. Shell Programming and Scripting

Using find for variable combination of perms

Hi, I'm trying to use find in kshell (AIX) to find all files with perms of write for other AND any execute bit set. e.g: r--r-x-w- would qualify and rw-rw--wx would qualify but ---rwxr-xr-x wouldn't qualify So far, I've been trying something like this: find . -type f -perm... (4 Replies)
Discussion started by: alanp36
4 Replies