09-22-2011
Quote:
Originally Posted by
Corona688
Well, it's receiving a message. Check the contents, see what it received.
Let me to describe a problem more precised :
I am expectin to open the message in other process in perl ,it should get a data from C->msgsnd and reply back to C-msgrcv.
I am expecting from C->msgsnd to be blocked untill perl will make msgrcv
and C->msgrcv to be blocked untill perl side will execute Perl->msgsnd .
However I don't run Perl at all and C->msgsnd should be stacked forever ...
However it execute msgsnd and msgread with previously send data without waiting ...
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
I am working closly with unix message queues i have encountered the following -
after creating the Q and start working with it (pushing & pulling) i receive the following stange parameters on the q's -
STIME=no_entry
Qnum=0
CBYTES=4140
when this happens, the Q is disabled (meaning i... (3 Replies)
Discussion started by: kel
3 Replies
2. Programming
Hi there:
Thanks first. When I use a message queue amony severl processes, will I have to synchronize the queue? I don't think I would have to because a message queue is implemented in a link listed. Correct me If I am wrong... (0 Replies)
Discussion started by: yanhu
0 Replies
3. Programming
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
4. Programming
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
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
Hii can anyone pls tell how to limit the max no of message in a posix message queue. I have made changes in proc/sys/fs/mqueue/msg_max
But still whenever i try to read the value of max. message in the queue using attr.mq_curmsgs (where struct mq_attr attr) its giving the default value as 10.... (0 Replies)
Discussion started by: mohit3884
0 Replies
7. Programming
Hi all,
I need help about message queues, i have a server-client program that communicates each other via msg queue, firstly server opens its msg queue and waits for msg then client opens server msg queue and its own msg queue(for receiving msg from server,clients sends msg to server msg... (7 Replies)
Discussion started by: SaTYR
7 Replies
8. Programming
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
9. Ubuntu
Hello
How can I see the created message queues in the system? (4 Replies)
Discussion started by: xyzt
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have a dilemma.I am running denyhosts on one of our servers and it monitors illegal ssh/ftp loggins. I am running vsftpd.
My manager though has put an additional requirement on me. When someone is blocked my denyhosts he want an error message to be displayed: " YOUR ACCOUNT HAS BEEN... (0 Replies)
Discussion started by: mojoman
0 Replies
LEARN ABOUT POSIX
sys_msg.h
<sys/msg.h>(P) POSIX Programmer's Manual <sys/msg.h>(P)
NAME
sys/msg.h - XSI message queue structures
SYNOPSIS
#include <sys/msg.h>
DESCRIPTION
The <sys/msg.h> header shall define the following data types through typedef:
msgqnum_t
Used for the number of messages in the message queue.
msglen_t
Used for the number of bytes allowed in a message queue.
These types shall be unsigned integer types that are able to store values at least as large as a type unsigned short.
The <sys/msg.h> header shall define the following constant as a message operation flag:
MSG_NOERROR
No error if big message.
The msqid_ds structure shall contain the following members:
struct ipc_perm msg_perm Operation permission structure.
msgqnum_t msg_qnum Number of messages currently on queue.
msglen_t msg_qbytes Maximum number of bytes allowed on queue.
pid_t msg_lspid Process ID of last msgsnd
().
pid_t msg_lrpid Process ID of last msgrcv
().
time_t msg_stime Time of last msgsnd
().
time_t msg_rtime Time of last msgrcv
().
time_t msg_ctime Time of last change.
The pid_t, time_t, key_t, size_t, and ssize_t types shall be defined as described in <sys/types.h> .
The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.
int msgctl(int, int, struct msqid_ds *);
int msgget(key_t, int);
ssize_t msgrcv(int, void *, size_t, long, int);
int msgsnd(int, const void *, size_t, int);
In addition, all of the symbols from <sys/ipc.h> shall be defined when this header is included.
The following sections are informative.
APPLICATION USAGE
None.
RATIONALE
None.
FUTURE DIRECTIONS
None.
SEE ALSO
<sys/ipc.h> , <sys/types.h> , msgctl(), msgget(), msgrcv(), msgsnd()
COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol-
ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE
and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained
online at http://www.opengroup.org/unix/online.html .
IEEE
/The Open Group 2003 <sys/msg.h>(P)