As far as I understand errno 22 in case of shmget is becasue A shared memory segment is to be created and the value of size is less than the system-imposed minimum or greater than the system-imposed maximum.
But something which I dont understand is I am calling shmget in my server twice first time with key_id as IPC_PRIVATE and size as 64K and second time as key_id as some random number let say 2
Through shmget and shmat, I am able to access the data stored in one program from another program.
Why can't i open semget with 4 semaphores for its semaphore set?
ie.:
semget(key_t key, int nsems, int semflg);
calling the above function with nsms as 3 is fine, but with 4 it returns minus 1..
int sempahore = semget((key_t)key,4,IPC_CREAT | MY_PERMS);
The above code only works if i change 4 for 3
other wise errno returns invalid arguments
i am using the code provided for the following question numa+mbind+segfault, every call to mbind returns EINVAL. How can I get what is exactly wrong? I am asking this because EINVAL is being returned for several many reasons. Thanks!
Hello friends,
I have a file "a.txt" its contents
-----------------
pid 4075 (caiopr) shmat(1929379932, 0x0000000000000000, 0) = 0x00000000ff030000 (errno 0) pid 4075 (caiopr) shmdt(0x00000000ff030000) = 144 (errno 0) pid 4075 (caiopr) shmctl(1929379932, IPC_RMID) pid 4205 (cau9cli.exe) shmget(13, 0, 438) = 1 (errno 0) pid 4205 (cau9cli.exe) shmat(1, 0x0000000000000000, 0) = 0x00000000fe
I have a suite of applications that communicate with each other using SysV queues. However, when I stop the application there are sometimes queues left open, which in turn causes problems next time I start the application.
To resolve this I want to delete the queues left open, but to know which queues to delete I would like to be able to list which queues are associated with a specific file.
Hi,
I'm using Ubuntu 10.04 on a 64bit machine.
In my shmat() call, I want to assign fixed memory address to shmaddr variable. I have no idea which address value to give.
I have two processes, each can take the same shmid from shmget().
In these two processes, shmat() gives different memory addresses.
The addresses are always the same for each of the process:
Process1: 0x41b31000
Process2: 0x4017d000
I do not think the addresses are virtual addreses as stated the answer which is written in the question below, beside, if these addresses are virtual addresses, t
I faced an issue, when I try to send to multicast group by setting the intended outgoing interface by the code bellow, Actually when the condition is TRUE (if(config.enable_if == 1)) the sendto system call returns error Invalid Argument, but if the condition was False sendto send data and doesn't generate any error.
Please Anyone has an idea, or should I modify anything in my code?