50 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
167
views
SysV semaphore thread thread bouncing
I've got a monitor class similar to the monitors in Java and .NET. It can be implemented somewhat more efficient than a simple combination of mutex and condition variable. Therefore I've got a ...
-1
votes
1
answer
192
views
Can I get the values of st_ino and st_dev that used in <sys/stat.h> but in my java code?
I want to replicate this code part that used to convert file to key in my java project in order to access SharedMemory data.
so the code in c looks like that:
key_t ftok(const char *path, int id)
{
...
0
votes
1
answer
140
views
message queue (systemvipc) removed in OpenSUSE Leap 15.5 while working in SLES15 SP3 or under root user
I have a IPC mechanism auto removal issue happening on OpenSUSE Leap 15.5 Beta but not happening on SUSE Linux Enterprise Server SP3.
A simple scenario is this executable put in a service script:
# &...
0
votes
0
answers
169
views
Automatic clenaup of Posix Semaphores, System V alternative
According to my research, there is a automatic cleanup mechanism on /dev/shm directory, made by systemd, with removeipc configuration.
Will systemd remove my posix semaphores (under /dev/shm) at ...
0
votes
2
answers
787
views
Shared memory between C and python
I want to share memory between a program in C and another in python.
The c program uses the following structure to define the data.
struct Memory_LaserFrontal {
char Data[372]; // original ...
1
vote
1
answer
561
views
Shared Memory in C (sysV)
struct shared_memory_t {
int value1;
int value2;
char* buffer;
};
shmid = shmget(key, sizeof(shared_memory_t) + segsize, 0666|IPC_CREAT);
shared_memory_t* mem = (shared_memory_t*) shmat(...
0
votes
1
answer
807
views
python sysv-ipc create/attach/delete a shared memory
I need to start a process create shared memory, and then start other processes to read it. is there an example ?
run:
SharedMemory(9001,mode=666,size=9999,flags=IPC_CREX)
got:
sysv_ipc....
2
votes
1
answer
372
views
What is the relationship of a shmget buffer and semget semaphore with the same key?
I'm trying to understand the implications of using the same System V key_t value for allocating a shared memory buffer via shmget() and a semaphore via semget(). Does this present any conflict, i.e. ...
2
votes
1
answer
519
views
Shmget error for shared memory of a matrix
Context of the code: Hello, I am trying to create a program that can multiply two 2x2 matrixes using separate processes (child1 and child2). Specifically child1 processes row1 of the resulting matrix ...
1
vote
1
answer
4k
views
Is there a way to increase the maximum amount of messages that can be contained in a SysV message queue?
I just switched from POSIX to SysV because the limit is much higher on SysV (1024 vs 10). But I still need an higher limit. The limit should be changed at runtime, because it depends on the data the ...
1
vote
1
answer
395
views
Why does msgrcv return Identifier removed?
I'm learning IPCS and I try to send a message from a client to a server which will multiply it by 2 and send it back to the client using ftok, msgget, msgrcv, msgsnd and msgctl services of libc/linux.
...
-1
votes
1
answer
687
views
linux ipc. Why is msgrcv always blocking?
client readline write to shared memory.and send a msg to server.
server get msg and read from shared memrory.
But the server cannot output correctly,
The server did not output anything,I do not know ...
2
votes
2
answers
2k
views
Difference between EIDRM and EINVAL errno from semop call
I was testing some code using Sys V Semaphores for its ability to recover from various events, and for one such test, I deleted the semaphore set (from the terminal) while the process was in its ...
1
vote
1
answer
96
views
Can't find the solution for my guessing game
I'm making a different version of my guessing game. This time, the child process has to send it's guess to the parent, which then evaluates that. What I think I'm doing wrong is that my child only ...
0
votes
0
answers
406
views
How to use SYSVIPC in MSYS2?
I'm using package msys2/gcc in a 64-bit MSYS2 installation, under Windows 10 64-bit.
Sample C program:
#include <stdio.h>
#include <errno.h>
#include <sys/ipc.h>
#include <sys/...