ipc

Forks and Pipes in C UNIX

I'm not sure if I am even barking up the right tree here... but here goes. I'm trying to pass data from my parent process to all children. It's a simple server program that basically will keep a list of connected clients and then send the routing table of connected clients to every client. This is eventually going to include a struct of...

Shared POSIX objects cleanup on process end / death.

Hi, Is there any way to perform POSIX shared synchronization objects cleanup especially on process crash? Locked POSIX semaphores unblock is most desired thing but automatically 'collected' queues / shared memory region would be nice too. Another thing to keep eye on is we can't in general use signal handlers because of SIGKILL which ca...

Qt portable IPC: only QSharedMemory?

Hi, I'm looking for suggestions about choosing a portable way to achieve local IPC in a robust way, since i'm new to C++ and would like to avoid common pitfalls of fiddling with shared memory and locks; therefore I was thinking about message-passing style ipc. I was planning to use qt for other reasons anyway, thus i took a peek to Qt ...

Linux Pipes as Input and Output

I would like to do the following inside a C program on a Linux os: Create a PIPE using a syscall (or 2) Execute a new process using exec() Connect the process's STDIN to to the previously created pipe. Connect the process's output to another PIPE. The idea is to circumvent any drive access for performance purposes. I know that the ...

transparent process creation for cocoa components

I have an application A which may or may not need to spawn an application B and will communicate with it using remote messaging (via NSConnections etc.). While i know how to do this if B is started first, i wonder: What is a clean cocoa-based approach of transparently starting B on demand? (For those familiar with COM, i am effectively...

Sockets vs named pipes for local IPC on Windows?

Are there any reasons for favoring named pipes over sockets for local IPC (both using win-api), effectiveness-wize, resource-wize or otherwise, since both behave very much alike (and likely to be abstracted by a similiar interface anyway), in an application that is likely to already use sockets for network purposes anyway? I can name at...

How to IPC between PHP clients and a C Daemon Server?

Hi all, and thanks for taking a look at the question. The background I have several machines that continuously spawn multiple (up to 300) PHP console scripts in a very short time frame. These scripts run quickly (less than a second) and then exit. All of these scripts need read only access to a large trie structure which would be very e...

passing events from erlang to Clojure

I'm looking for a way to pass events back and forth between Clojure and erlang. has someone done this before? how should I encode the (immutable) messages in a flaxable general way? Should IPC be used for this? what sort? where has this gone wrong for you in the past? ...

posix_ipc python package equivalent for Windows?

Inter process communication primitives (Semaphores, Shared Memory) in python on windows? posix_ipc works great on linux, anything similar for windows? ...

What IPC method should I use between Firefox extension and C# code running on the same machine?

I have a question about how to structure communication between a (new) Firefox extension and existing C# code. The firefox extension will use configuration data and will produce other data, so needs to get the config data from somewhere and save it's output somewhere. The data is produced/consumed by existing C# code, so I need to deci...

How can I connect to a remote machine via TCP and UDP with Perl?

I have a script that runs on a server and I want it now to send messages to my PC. I want to send TCP or UDP messages to some port. What is the best way to do this (a tutorial will be great)? And is there some client program that I can run on my PC that will listen to a local port for the messages? ...

[Android SDK] Throw a custom exception from a service to an activity

Hi, I'm currently working on an XMPP app' on Android and I'm pondering about the best way to throw a different type of Exception than a RemoteException to my activity from my service. As it seems impossible to throw another thing than a RemoteException using IPC (you can't declare to throw anything in your .aidl), I just see two soluti...

What is the easiest way to do inter process communication in C#?

I have two C# applications and I want one of them send two integers to the other one (this doesn't have to be fast since it's invoked only once every few seconds). What's the easiest way to do this? (It doesn't have to be the most elegant one.) ...

Checking the status of my PHP beanstalkd background processes

I have a website written in PHP (CakePHP) where certain resource intensive tasks are handled by a background process. This is done through the Beanstalkd message queue. I need some way to retrieve the status of that background process so I can monitor it with Monit. The background process is a CakePHP Shell (just a PHP CLI script) that ...

Is it better to use TThread's "Synchronize" or use Window Messages for IPC between main and child thread?

I have a rather simple multi-threaded VCL gui application written with Delphi 2007. I do some processing in multiple child threads (up to 16 concurrent) that need to update a grid control on my main form (simply posting strings to a grid). None of the child threads ever talk to each-other. My initial design involved calling TThread's "S...

How do I share a Core Data store between processes using NSDistributedNotifications?

Background I've already posted a question about the basics of sharing a Core Data store between processes. I'm trying to implement the recommendations given and I'm running into problems. My Goal I have two processes - the Helper App and the UI. They both share a single data store. I want the UI to update it's NSManagedObjectContext ...

How do I send and receive real-time signals `sigqueue()` in Python?

Python provides a signals module and os.kill; does it have a facility for sigqueue() (real-time signals with attached data)? What are the alternatives? ...

Is there any opensource high-performance IPC-like msg bus library in c++?

In my current project, I have a slightly distributed architecture, i.e., several executables collaborate with each other to get things done. To make things easier, i hope i could have a reliable 'backbone' message bus: when an executable hooks up to the msg bus, it can receive callback when new msg arrives. Similarly, it can publish new ...

What is the best way for two programs on the same machine to communicate with each other

I need to pass some data (integers) from one (C++) program to another (C#). What is the fastest way to do this? P.S.: OS: Windows XP ...

Should I use msgsnd or mq_send?

I'm learning Unix IPC, and my book only talks about the msg* family of functions. However while browsing the man pages I learned about the mq_ equivalents. http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi/0650/bks/SGI%5FDeveloper/books/T%5FIRIX%5FProg/sgi%5Fhtml/ch06.html describes some differences between the two, but I'm not sure...