4,843 questions
0
votes
1
answer
56
views
Merging of events not working in testbench [duplicate]
I am trying to merge events. Here I should get the output both Thread 1 display and Thread 2 display. But, I am only getting Thread 1 output.
I tried to do reverse by event_a = event_b also, in that ...
4
votes
1
answer
140
views
Unable to flush stdout: Bad file descriptor
foobar is a Perl script that prints to both standard output and standard error. In a separate Perl script echo-stderr, I run foobar and capture its standard error using IPC::Open3's open3 function, ...
-1
votes
1
answer
64
views
Electron IPC: File objects arrive as empty objects {} in main process
Problem
I'm trying to send multiple files from the renderer process to the main process using Electron's IPC, but the file objects arrive empty.
Renderer Process:
if (files?.length > 1) {
window....
2
votes
0
answers
121
views
Too big a latency of ping-pong between two IPC processes on Sapphire Rapids Xeon with plain loads and stores, instruction order makes a big difference
I am running simple Ping/Pong between two processes A, B with shared memory:
shm_A and shm_B are in separate cache lines. Allocated with separate calls to shm_open, so probably in different pages, ...
-5
votes
1
answer
118
views
File, one writer-process, lot of reader-process. GNU Linux [closed]
File, one writer-process, lot of reader-process
Hello. Could you please clarify if I understand correctly that this code doesn't guarantee that TestValue will always be read from the file? The goal ...
1
vote
0
answers
80
views
Can't a custom netlink protocol be bound by the application process via the bind method?
I'm attempting to receive kernel messages in a userspace program via a custom Netlink protocol. For example, obtain the plug-in and pull-out status of the DP interface and the information of the ...
3
votes
2
answers
209
views
In Linux, can I make a file unchangeable while the process creating it is running while removable if the process has been terminated?
My initiative here is to make a detection mechanism on process status by a "file lock".
Say I am developing a program in user mode. It will be inappropriate for some sources to be shared ...
-2
votes
1
answer
82
views
How to run a continuous bash program and have C start it, get input, and send it output, then gets it's input and then send it output [closed]
I've searched around and couldn't quite find and answer to this.
I'm trying to get C to open a bash program called L.
The I want to be able to run the program using something close to system or popen.
...
2
votes
2
answers
246
views
Can't make `future` work in parallel and concurrently on several (logical) cores
Within a Shiny app, a task that is triggered by a button is taking quite a long time to complete (synchronous sequential code).
That's why I want to split this task over several (logical) cores of my ...
0
votes
1
answer
52
views
Not to update form after IPC
I'm developing a webapp on Liferay with JSF Primefaces. I have Portlet 1 and Portlet 2 on the same page. I wish to update a component on the UI in the Portlet 1 after a button is clicked in Portlet 2.
...
1
vote
1
answer
85
views
Android ContentProvider returns null cursor when accessed from second app but works within provider app
Communication Between Two Android Apps Using ContentProvider Not Working
Problem Statement
I'm trying to share data between two separate Android applications using a ContentProvider. App A provides ...
0
votes
0
answers
47
views
How to use socketio and ipc together in python
I am trying to building an server that communicates with the client using socketio protocol, Now the server starts multiple application as a sub processes, the server communicates with this ...
3
votes
2
answers
225
views
C++ portable IPC
I am porting a console application that was written in C targeting Linux. I want to make the code as portable as possible, so that it can also be used on Windows and other OSs. So far, I was able to ...
2
votes
1
answer
101
views
Reading from a pipe immediately after opening it
I wanted to launch an executable from a parent process. Wait until that process is finished, then read back what it wrote into stdout. It turns out you can't wait for the program to finish and then ...
4
votes
1
answer
164
views
Shared memory disappears after writer process finishes, even though shmctl is not used to remove it
I am using System V shared memory in my program. The writer process successfully creates the shared memory using shmget(). When the writer process ends, I notice that the shared memory segment ...
4
votes
1
answer
68
views
Does write system call need the data to be read to give >-1 return?
Sorry for the basic question, but I can't find a straight answer that I can understand on the documentation or with generative AI.
When I do a write call over a pipe between a parent and child process,...
3
votes
1
answer
82
views
Why doesn't SigPnd change in /proc/<pid>/status?
I am trying to understand the signals in POSIX/Linux. I wrote this test.c program:
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
void handler(...
2
votes
1
answer
134
views
Multiprocessing.Process with spawn vs Subprocess.Popen
I have a binded C++ python library with a class that can only be initialized once per process (unfurtonately, due to legacy C++ code).
To overcome this, I created a subprocess wrapper around my class ...
2
votes
0
answers
144
views
Process synchronization using advisory locking
I'm trying to do an exercise from Advanced Programming in the UNIX Environment where I need to:
Open a file that contains a counter.
Fork a process.
Have the parent and child increment the counter ...
2
votes
1
answer
75
views
Two-way pipe communication failing with XmlSerializer
I have the following NamedPipe server (running in .NET Framework):
private void PipeListenerThread()
{
PipeSecurity pipeSecurity = new PipeSecurity();
pipeSecurity.AddAccessRule(new ...
2
votes
3
answers
101
views
Splitting a MemoryMappedFile into 2 chunks of data in C#
I'm trying to create a MemoryMappedFile with 2 view accessors, each accessing different regions of this shared memory.
This is a simplified version of what I'm doing:
const int block1Size = 20;
const ...
0
votes
1
answer
115
views
How many copies are needed for a ZeroMQ IPC request?
I am investigating how many times a copy happens in an IPC request. This helps me decide the best solution for my mobile device.
For example, shared memory is zero-copy, since processes can directly ...
2
votes
1
answer
160
views
Windows: passing a file handle to child process as an osfhandle
I'm trying to implement interoperability between a host process written in C++ and a child process which is a Node.js instance on Windows. I do not have control on the child process's IPC API, I have ...
1
vote
0
answers
96
views
How should I create a background process that communicates with many instances of a shell in a performant way?
I'm working on a syntax highlighter for the zsh ZLI, which I'm writing in rust. Essentially it consumes text from zsh, and returns text which represents the highlighted syntax. Perhaps this would be ...
0
votes
1
answer
71
views
shmat pointers with arrays of structures and another unrelated variable
Basically - I want to put a singular int, and an array of the following structures:
struct My_structure {
char my_text[200];
char my_name[20];
int my_number;
};
Into a shared memory ...
0
votes
0
answers
59
views
Can I have more streams than just stdout, stdin and stderr?
I have a process which will run a subprocess. Both will talk to a device through a serial port. The subprocess will be executing the custom code of a programmer using my library. Sometimes the ...
0
votes
1
answer
101
views
Using Channel<T> Across Processes
Is there any way to use the .NET Channel API across processes? I was thinking about the synchronization primitives that can receive a name and therefore can be accessed by any process in the same ...
0
votes
1
answer
91
views
Pipe read maximum number of elements?
I tried to write a simple reader and writer program.
reader:
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#...
2
votes
0
answers
88
views
Can't receive messge in IPC Communication
I have a server and a client. The server is responsible for forking child processes and interacting with them to get log outputs to send to the client. It also receives input from the client and sends ...
0
votes
0
answers
42
views
There are some techniques that i'm missing out in creating this IPC more robust and consistent? [duplicate]
[C language]\
Hello there! I'm trying to do a simple IPC between two files ".c" but I'm facing some unexpected output.
I'm compiling the server file, nothing wrong, the PID is clearly ...
1
vote
0
answers
92
views
IPC::Run and Applescript
My end-goal is to:
get PNG data from the clipboard on MacOS
do stuff with it (typically with ImageMagick)
put it back onto the clipboard
and I'm trying to do that with IPC::Run in perl
It looks like ...
0
votes
1
answer
114
views
Erlang/OTP node connectivity issues running under WSL2 and using "longnames" for the `name_domain`
Trying to RPC to another node from a script, everything works when using "shortnames" but fails when using "longnames".
Where my local machine name is "Pandora", and ...
1
vote
2
answers
296
views
Why is the value for sem_open(O_CREAT) ignored if the semaphore already exists?
According to the manual, sem_open(name, O_CREAT, mode, 1) returns success (the semaphore address) if the semaphore exists. But the caller can't know whether:
the newly created semaphore is now at 1
...
0
votes
1
answer
74
views
Using C# NetTCPBinding and WCF, How Do I Get the Port the Client is Connecting From for Same Machine TCP Communication?
I'm trying to find out what C# method, or attribute on some known variable, I can use to determine information about the client. The communication is happening fine. I'm using NetTCPBinding and have ...
1
vote
0
answers
176
views
"splice" two pipes together?
I would like to launch a process, provide some initial input to it, and then have it "take over" stdin and stdout as though I had execve'd it. While the question is language-independent, ...
1
vote
0
answers
95
views
How to Avoid Granting PipeAccessRights.CreateNewInstance to User Without NamedPipeServerStreamAcl.Create Throwing UnauthorizedAccessException
I've seen similar questions addressing the issue of creating a NamedPipeServerStream with security configurations throwing UnauthorizedAccessException.
The problem lies in creating multiple instances ...
0
votes
1
answer
59
views
Making Python script running in a shell terminal read stdin from another shell instance
I have a python script which reads and input when provided and does something with the input (see process_input below):
import sys
def process_input(input_data):
# logic to process the input data
...
3
votes
1
answer
102
views
Why can't I read from the stdout/stderr of a process spawned with forkpty in the C++20 coroutines + Asio single-threaded multi-coroutine model?
I am new to corotine and asio.
I am working on a local process management tool where a client is responsible for launching a program. This client sends commands to a backend daemon that manages the ...
1
vote
0
answers
108
views
linux sys/shm.h latency can be 20us?
I want to exchange data between processes.
I choose shared memory, the reason is i think it's fastest IPC method.
But the following code tells different story.
string_worker.hpp: this is a base class, ...
0
votes
1
answer
83
views
How to pass a complex data structure in a callback from an AAR (Kotlin)
I have written an AAR in Kotlin, which has a function that:
takes a list of BLE devices
also takes a list of messages (byte arrays)
and tries to send all the messages to all the devices - at the end ...
1
vote
0
answers
91
views
Problems with opening / locating an existing Memory Mapped File between two processes (NET 8)
Got this standard library I'm developing for standardized inter-process comms using memory mapped files (mmfs). It appears to properly create the mmf on the server side, but the client doesn't seem to ...
1
vote
1
answer
115
views
Electron and React app experiences refresh-like effect during IPC database operations
I'm developing a desktop application using Electron and React, and I'm encountering an issue where performing write operations to a SQLite database via IPC causes a refresh-like effect in the UI. This ...
0
votes
1
answer
100
views
How to do inter-process communication with pathos/ppft?
I'm using the pathos framework to do tasks concurrently, in different processes. Under the hood, this is done with ppft, which is part of pathos. My current approach uses a pathos.multiprocessing....
0
votes
0
answers
27
views
IPC using Message Queue random jumps in ids
I recently came across this topic while going through Advanced Programming in Unix Environment about IPC using message queues. I implemented a simple program that creates and deletes queues 5 times in ...
0
votes
1
answer
210
views
gRPC in .NET - Unix Domain Sockets - No connection could be made because the target machine actively refused it
I've started playing with gRPC, having 3 projects:
WPF as a Client,
Class Library as a business logic,
GRPC Server as a Windows Service.
This is what I see often:
Status(StatusCode="...
1
vote
2
answers
440
views
`shmget` Invalid argument error -- is memory still allocated from a previous execution?
I have the following program to exercise using forks and shared memory.
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/...
0
votes
2
answers
63
views
How services communicated before RPC
I recently found out that RPC and REST are just API constructs and not different protocols through which two services communicate and send data to each other over the network. The underlying protocol ...
1
vote
0
answers
282
views
How to access ipc on host from a docker container and keep internal ipc private?
An application let's say A (which is made of several processes) uses a lot of hard coded filenames for message queues, shared memory and semaphores. The application is proprietary, should be run as ...
0
votes
0
answers
120
views
WCF with Named Pipes and WPF - Timeout with time-consuming operations
I'm struggling with the project that are copying files from the network(CIFS share).
IPC which I'm using is Named Net Pipes with Duplex Channel and for GUI I'm using WPF.
The application is ...
0
votes
0
answers
107
views
Why can't this object be cloned?
The Electron WebView supports a executeJavascript() method which supposedly executes the provided snippet within the render process of the guest content. However, the example provided below fails with ...