Sponsored Content
Full Discussion: msgrcv : Invalid argument
Top Forums UNIX for Dummies Questions & Answers msgrcv : Invalid argument Post 302165591 by answers on Friday 8th of February 2008 08:54:33 AM
Old 02-08-2008
msgrcv : Invalid argument

Hi All,

Please guide me how to get rid :

msgrcv : Invalid argument.

I am using message queues: msgsnd and msgrcv,

I am able to send through msgsnd and receive through msgrcv, but at times i get the belo error.

msgrcv : Invalid argument.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

stty: : Invalid argument

Hello Everyone; I have a script that is throwing the following message: stty: : Invalid argument The line that gives the message is the following, sailormoon$ scp home/voice.xml newwave@silvermoon:/newwave/config/radius stty: : Invalid argument voice.xml | ... (2 Replies)
Discussion started by: tony3101
2 Replies

2. Solaris

ps: 65535 is an invalid non-numeric argument for -p option

I want to figure out what is the reason of error message I have in Solaris 10. Why Solaris 10 dosn't recognize 65535? ps: 65535 is an invalid non-numeric argument for -p option usage: ps 'format' is one or more of: Thank you (5 Replies)
Discussion started by: gogogo
5 Replies

3. Programming

error "Invalid argument" returned after call sched_setscheduler

the code is below and the was run on Solaris 9. ----------------------------- struct sched_param param; param.sched_priority = 99; if(sched_setscheduler(0, SCHED_RR, &param) == -1) { perror("setting priority"); exit(1); } ------------------------------- after the... (1 Reply)
Discussion started by: robin.zhu
1 Replies

4. Solaris

Invalid Argument and glassfish

I tried to install glassfish on Solaris 10 and it worked fine on other instances. I got the below message bash-3.00# ./sjsas-9_1_01-solaris-sparc.bin -console bash: ./sjsas-9_1_01-solaris-sparc.bin: Invalid argument I logged on as root and the file has execute permission. So strange. Do... (1 Reply)
Discussion started by: Andrew2008
1 Replies

5. IP Networking

sendto invalid argument

Hi I lost a lot of time in understanding the message "sendto Invalid argument" when I execute the following code. This code is a simple UDP sender improved with some reliability feature. My goal is to send a file. I've reported only the code which may be useful. Can anyone help me? Thank you... (0 Replies)
Discussion started by: Puntino
0 Replies

6. UNIX for Dummies Questions & Answers

Need FIX for: RTNETLINK answers: Invalid argument

OK...I'm using the latest version of Fedora 10. My network connection was working fine, and I had several network LAN shares on my desktop. Then I rebooted the system without dismounting those shares first. ooops. <:( ...When the system came back up, my network connection was gone. All... (2 Replies)
Discussion started by: Pudnik
2 Replies

7. UNIX for Advanced & Expert Users

invalid argument in semctl()

When I am using the function semctl() it is giving me error as the INVALID ARGUMENT. Can any body give me the possible reasons??? (2 Replies)
Discussion started by: asimibm
2 Replies

8. Programming

SIOCSARP: Invalid Argument.

Hello everybody, I've been programming an alternative to linux's standard 'arp' program. I can delete arp entries (SIOCDARP), get arp entries (SIOCGARP), but i'm having troubles setting entries with ioctl. I can't set any PERM, USETRAILERS, or COM address. It only adds PUB entries and i don't... (2 Replies)
Discussion started by: semash!
2 Replies

9. UNIX for Advanced & Expert Users

NFS : Invalid argument (Remote share mounting issue)

Hi Guru's, I am unable to mount NFS share on unix system (DG/UX) which is nfs client. Error: mount: /nfsshare: Invalid argument mount: giving up on: /mountpoint i tried following command mount -t nfs remotehost:/nfsshare /mountpoint Error: (5 Replies)
Discussion started by: Justin John
5 Replies

10. UNIX for Beginners Questions & Answers

Mount error in Linux: invalid argument

hi i have an android phone which i think is bricked, so wanted to see what the actual issue is, I flashed it with TWRP recovery image and launched terminal i, was able understand that mount is not happening, it says invalid argument and no such file or directory. Below is what i get while... (32 Replies)
Discussion started by: nanz143
32 Replies
msgrcv(2)							   System Calls 							 msgrcv(2)

NAME
msgrcv - message receive operation SYNOPSIS
#include <sys/msg.h> ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long int msgtyp, int msgflg); DESCRIPTION
The msgrcv() function reads a message from the queue associated with the message queue identifier specified by msqid and places it in the user-defined buffer pointed to by msgp. The msgp argument points to a user-defined buffer that must contain first a field of type long int that will specify the type of the mes- sage, and then a data portion that will hold the data bytes of the message. The structure below is an example of what this user-defined buffer might look like: struct mymsg { long int mtype; /* message type */ char mtext[1]; /* message text */ } The mtype member is the received message's type as specified by the sending process. The mtext member is the text of the message. The msgsz argument specifies the size in bytes of mtext. The received message is truncated to msgsz bytes if it is larger than msgsz and (msgflg&MSG_NOERROR) is non-zero. The truncated part of the message is lost and no indication of the truncation is given to the calling process. The msgtyp argument specifies the type of message requested as follows: o If msgtyp is 0, the first message on the queue is received. o If msgtyp is greater than 0, the first message of type msgtyp is received. o If msgtyp is less than 0, the first message of the lowest type that is less than or equal to the absolute value of msgtyp is received. The msgflg argument specifies which of the following actions is to be taken if a message of the desired type is not on the queue: o If (msgflg&IPC_NOWAIT) is non-zero, the calling process will return immediately with a return value of -1 and errno set to ENOMSG. o If (msgflg&IPC_NOWAIT) is 0, the calling process will suspend execution until one of the following occurs: o A message of the desired type is placed on the queue. o The message queue identifier msqid is removed from the system (see msgctl(2)); when this occurs, errno is set equal to EIDRM and -1 is returned. o The calling process receives a signal that is to be caught; in this case a message is not received and the calling process resumes execution in the manner prescribed in sigaction(2). Upon successful completion, the following actions are taken with respect to the data structure associated with msqid (see Intro(2)): o msg_qnum is decremented by 1. o msg_lrpid is set equal to the process ID of the calling process. o msg_rtime is set equal to the current time. RETURN VALUES
Upon successful completion, msgrcv() returns a value equal to the number of bytes actually placed into the buffer mtext. Otherwise, -1 is returned, no message is received, and errno is set to indicate the error. ERRORS
The msgrcv() function will fail if: E2BIG The value of mtext is greater than msgsz and (msgflg&MSG_NOERROR) is 0. EACCES Operation permission is denied to the calling process. See Intro(2). EIDRM The message queue identifier msqid is removed from the system. EINTR The msgrcv() function was interrupted by a signal. EINVAL The msqid argument is not a valid message queue identifier. ENOMSG The queue does not contain a message of the desired type and (msgflg&IPC_NOWAIT) is non-zero. The msgrcv() function may fail if: EFAULT The msgp argument points to an illegal address. USAGE
The value passed as the msgp argument should be converted to type void *. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
Intro(2), msgctl(2), msgget(2), msgsnd(2), sigaction(2), attributes(5), standards(5) SunOS 5.11 19 May 1999 msgrcv(2)
All times are GMT -4. The time now is 12:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy