ipc

Multicast IPC options in unix

痴心易碎 提交于 2019-12-10 17:46:33
问题 Among the following list of IPC options, which could perform multicast (i.e. 1 sender and multiple receivers): signals half duplex pipe named pipe system V message queue unix domain socket Edit memory mapped files From my understanding, it might be possible with named pipe (not sure). 回答1: There's nothing as conceptually flexible as multicast, but with a few limitations some of the facilities might do what you want. Signals may be delivered to a process group. The other IPC mechanisms you

PHP - Access shared Memory created with C++

≯℡__Kan透↙ 提交于 2019-12-10 17:26:44
问题 Since a few days i'm trying to get the following thing to work: I have a tiny C++ program which reads some data continuously from a serial port. This data is stored in shared memory like this: HANDLE hMapFile; hMapFile = CreateFileMapping( INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 10, NULL); LPCTSTR pBuf; pBuf = (LPTSTR) MapViewOfFileEx( hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, 10, NULL); while(true) { //... some code ... CopyMemory((PVOID)pBuf, szMsg, (_tcslen(szMsg) * sizeof(TCHAR))); //..

Java - Python shared memory communication

╄→гoц情女王★ 提交于 2019-12-10 17:21:12
问题 We have one program in Java and one in Python, and need to get them taking together in a ping-pong manner, each time exchanging an integer array of length 100,000, and taking ~ 0.1 - 1 second to do their work: Java does some work and fires an int array of length 100,000 over to ... Python , which does some work and fires a new array of length 100,000 back to ... Java , which does some work ... etc Note that Each program needs to wait for the other to do it's part. They will run on the same

Fast inter-process (inter-threaded) communications IPC on large multi-cpu system

↘锁芯ラ 提交于 2019-12-10 17:07:54
问题 What would be the fastest portable bi-directional communication mechanism for inter-process communication where threads from one application need to communicate to multiple threads in another application on the same computer, and the communicating threads can be on different physical CPUs). I assume that it would involve a shared memory and a circular buffer and shared synchronization mechanisms. But shared mutexes are very expensive (and there are limited number of them too) to synchronize

.NET inter-process “events”

☆樱花仙子☆ 提交于 2019-12-10 16:01:28
问题 I have multiple instances of the same application running. The user ask can click "Quit" on each instance to shut it down. I would like to add the choice to "Quit All Instances", which will raise some kid of "event" that notifies all instances of the application that they should close. I don't need to transport any data along with this event. What's the best (and preferably simplest) way to do this in Windows using C#/.NET? 回答1: Send the good'ol WM_CLOSE to all instances... Process[]

Access mmap memory from another process

柔情痞子 提交于 2019-12-10 15:29:50
问题 I've started playing with mmap. I'm trying to create an example workspace that will be then extended to the real case. This is what I want to achieve: PROCESS 1: mmap a file (actually a device, but it's okay to generate an example with a text file) PROCESS 2: (not foked from process 1; just an independent process) read the memory mapped by process 1 change some bits write it to a new file I've read several examples and documentations, but I still didn't find how to achieve this. What I'm

How to receive simplest Windows message on UWP XAML MVVM app?

元气小坏坏 提交于 2019-12-10 13:38:45
问题 My big-picture problem: I need to send a signal from a Windows 10 desktop app (or a service, really) to a UWP XAML MVVM app on the same OS instance / machine. I was using named semaphores in the global namespace, but these don't work at all on UWP (by design, for security reasons maybe). No joy. I tried UWP sockets, and this works with the UWP as listener only if the client is on a remote machine. Is this a security design decision, too? No idea. Exempting the app from loopback restriction

How do I receive a signal sent with sigqueue in a c program (on linux)?

百般思念 提交于 2019-12-10 12:53:32
问题 How do I receive receive a signal sent with sigqueue in a c program (on linux)? If just use kill to send a signal I just add a receiver with something like this signal(SIGUSR1, sigusr1); that point to a simple function like this: void sigusr1() { signal(SIGUSR1,sigusr1); printf("SIGUSR1 ....\n"); } But if I send a signal with sigqueue, how would I do then? Thanks Johan Add a sigaction: struct sigaction action; action.sa_flags = SA_SIGINFO; action.sa_sigaction = &sigusr2; if (sigaction(SIGUSR2

Why can't get the main window handle for a started process?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 12:45:22
问题 I have a situation where I'm starting a process in my code in order to set up an IPC channel. The process I'm starting is an MFC application with no CLR support. The application from which I am starting this process is a C# module in a WPF application (thought I don't think that that is consequential to my problem). This works with a version of the application that does support CLR, and it works on every computer except the deployment target, a touch screen computer with Windows 7. But for

Client to Client communication using select() function in c

依然范特西╮ 提交于 2019-12-10 11:40:41
问题 I was trying to implement a client to client communication with a server in between them. The function of the server is that when a client suppose Client A sends a message to the server, the server should forward that message to the other client, Client B. Same way when the Client B sends a message to the server it should be forwarded to Client A. This programs involves only two clients. The error I get when I execute the code is that it says: Socket Operation on Non-socket I get this error