ipc

What are alternatives to Win32 PulseEvent() function?

The documentation for the Win32 API PulseEvent() function (kernel32.dll) states that this function is “… unreliable and should not be used by new applications. Instead, use condition variables”. However, condition variables cannot be used across process boundaries like (named) events can. I have a scenario that is cross-process, cross-r...

How can I share dynamic data array between Applications?

Hi, I use CreateFileMapping, but this method was not useful,because only static structure can be shared by this method. for example this method is good for following structure: struct MySharedData { unsigned char Flag; int Buff[10]; }; but it's not good for : struct MySharedData { unsigned char Flag; int *Buff; }; woul...

Shared Memory and Process Sempahores (IPC)

This is an extract from Advanced Liniux Programming: Semaphores continue to exist even after all processes using them have terminated. The last process to use a semaphore set must explicitly remove it to ensure that the operating system does not run out of semaphores.To do so, invoke semctl with the semaphore identifier, the number of...

.net EventWaitHandle in Inter-Process Context

Hi all, when creating a named EventWaitHandle in each process you can specifiy in which state it should be. Now this somehow contradicts the assumption that the EventWaitHandle is usable for IPC as another process might have set the state to "signalled" whereas I (when creating the EventWaitHandle) can set it to "not signalled". Any id...

Is mmap the best way to communicate between processes?

I use a file to communicate between Python and Ruby script. But, we have mmap. So here are my questions. Can I do the same thing (communicate between processes) with mmap? What advantage can mmap give us over physical file? Speedup? What would be the easiest way to communicate between two processes? What would be the fastest way to co...

C IPC waiting for child

So I have a program which creates a child process and executes a command (for example, ls). The parent will then use pipes to send to and get from the child. This works fine when I'm inputting commands myself from the command line. However, when the input comes from a file, it seems like the child doesn't have enough time to run and I g...

QLocalSocket and QLocalServer in browser plugins

Hi, I have a simple doubt. Does the ipc mechanism in qt work when we use it for developing browser plugins? The reason i ask this is that I can easily get the QLocalSocket and QLocalServer communication to work in a qt application, but when i write a similar piece of code in a browser plugin dll i see that the server does not accept a n...

.net 4.0 creating a MemoryMappedFile with global context throws exception

Hi all, I want to create a global MemoryMappedFile in C# 4.0 using following call: string MemoryMappedFileName = "Global\\20E9C857-C944-4C35-B937-A5941034D073"; ioBuffer = MemoryMappedFile.CreateNew(MemoryMappedFileName, totalIoBufferSize); This always throws following exception "System.UnauthorizedAccessException: Access to the path...

IPC in qt browser plugins

Hi, I have a simple doubt. Does the ipc mechanism in qt work when we use it for developing browser plugins? The reason i ask this is that I can easily get the QLocalSocket and QLocalServer communication to work in a qt application, but when i write a similar piece of code in a browser plugin dll i see that the server does not accept a n...

Condition Variable in Shared Memory - is this code POSIX-conformant?

Does the POSIX standard allow a named shared memory block to contain a mutex and condition variable? We've been trying to use a mutex and condition variable to synchronise access to named shared memory by two processes on a LynuxWorks LynxOS-SE system (POSIX-conformant). One shared memory block is called "/sync" and contains the mutex ...

IPC: Communication between Qt4 and MONO processes (on linux)

I have to connect a Qt4 application to a mono Application. The current proof of concept uses network sockets (which is nice, I can debug using nc on the command line). But I am open to new suggestions. What are my alternatives? Edit: The original application stack is split into two parts: server + client. The client is supposed to sho...

.NET WebService IPC - Should it be done to minimise some expensive operations?

I'm looking at a few different approaches to a problem: Client requests work, some stuff gets done, and a result (ok/error) is returned. A .NET web service definitely seems like the way to go, my only issue is that the "stuff" will involve building up and tearing down a session for each request. Does abstracting the "stuff" out to an ap...

Linux Shared Memory

The function which creates shared memory in *inux programming takes a key as one of its parameters.. What is the meaning of this key? And How can I use it? Edit: Not shared memory id ...

Best way to do interprocess communication on Mac OS X

I'm looking at building a Cocoa application on the Mac with a back-end daemon process (really just a mostly-headless Cocoa app, probably), along with 0 or more "client" applications running locally (although if possible I'd like to support remote clients as well; the remote clients would only ever be other Macs or iPhone OS devices). Th...

Communicating between a parent and its children

Newbie question: On Unix, in a program with a parent and some children: - How can the parent alert the children efficiently to do some work.. ? - Or how can the children wait for parent signal to start doing some work? EDIT: This program tries to do a complex computation in parallel, I have already used shared memory as a common works...

unix message queue

Is there an ipc option to get the last message in message queue but not removing it? I want this to allow many clients reading same messages from the same server.. Edit: Server and clients are on the same machine! Thanks ...

IPC speed and compare

I am trying to implement a real-time application which involves IPC across different modules. The modules are doing some data intensive processing. I am using message queue as the backbone(Activemq) for IPC in the prototype, which is easy(considering I am a totally IPC newbie), but it's very very slow. Here is my situation: I have i...

How do I connect two apps

I am considering building an app in C++ that will be parsing text from the web and create some statistical results. These results I want to be fed in an external app in real time. The external app (to whose code I have no access, but can ask for a - paid - custom made addition) will then need some code to read and use these results. I a...

Help with POCO library (Shared memory)

I was advised to use the POCO library for inter-process communication (IPC). Looks like a powerful library and there is some documentation in the code, but I would prefer a working example , since I am not very familiar with the IPC stuff. I 've been searching for some time now and I'm out of luck. If anyone has used POCO Shared Memor...

IPC problem in the c# - ipc is already registered

hi I am trying to create two IPC channels IpcChannel ipcChannel = new IpcChannel("DroolsClient"); ChannelServices.RegisterChannel(ipcChannel, false); objec = (DroolsInterface.RulesEngineInterface)Activator.GetObject(typeof(DroolsInterface.RulesEngineInterface), "ipc://Drools/SreeniRemoteObj"); IpcChannel ipcChannel2 = new IpcChannel(...