ipc

Local Chat server in C using IPC

Hi Guys I need to write a chat server in C. It only needs to use IPC. Could you help me on how to proceed on this. A skeleton code will help me a lot. ...

How to solve "msgget: No space left on device" error?

I am writing an IPC application using message queues. While using msgget() function to get Message Queue I am getting this error. The requested operations does not require lot of space on the device and there should be space left as well. Any ideas. Thank you in advance ...

How can I cleanup the IPC message-queue?

I am using msgget() function in my IPC based application. How can I clean up the queue filled up with old message queues? ...

Is it possible to use function pointers across processes ?

I'm aware that each process creates it's own memory address space, however I was wondering, If Process A was to have a function like : int DoStuff() { return 1; } and a pointer typedef like : typedef int(DoStuff_f*)(); and a getter function like : DoStuff_f * getDoStuff() { return DoStuff; } and a magical way to communicate wit...

How reliable are unix domain sockets?

I'm trying to figure out a protocol to use with domain sockets and can't find information on how blindly the domain sockets can be trusted. Can data be lost? Are messages always received in the same order as sent? Even when using datagram sockets? Are transfers atomic? When reading the socket, can I trust that I get the whole message o...

perl hangs on exit (after closing a filehandle)

I've got a function that does (in short): my $file = IO::File->new("| some_command >> /dev/null 2>&1") or die "cannot open some_command for writing: $!\n"; ... undef $file; Right now I'm not even writing anything to $file. Currently there are no other operations on $file at all. When I run the program, it doesn't exit properly. I...

Win32 Mutex not waiting.

I am creating an application that implements inter process communication. For this purpose I have set up a shared buffer, which seems to work fine. Now, I need a way for the data generating application (written in c++) to tell the data receiving application (written in freepascal/lazarus) when it should read the data. I was trying to...

Error in msgrcv: Invalid Arguments

I am writing a code in C on a unix system. I have created a message queue server. Each time I receive a new message I fork and the child process handles the new client. The server waits for new client. Here's the code. for (;;) { struct my_msgbuf buf; if (msgrcv (msqid, &(buf.mtype), sizeof (buf), 1, 0) == -1) perror ("msgrcv")...

blocks - send input to python subprocess pipeline

I'm testing subprocesses pipelines with python. I'm aware that I can do what the programs below do in python directly, but that's not the point. I just want to test the pipeline so I know how to use it. My system is Linux Ubuntu 9.04 with default python 2.6. I started with this documentation example. from subprocess import Popen, PIPE...

How do I do a non-blocking IPC read on Windows?

I have a Perl script that uses an external tool (cleartool) to gather information about a list of files. I want to use IPC to avoid spawning a new process for each file: use IPC::Open2; my ($cin, $cout); my $child = open2($cout, $cin, 'cleartool'); Commands that return single-lines work well. e.g. print $cin "describe -short $file\n"...

Logging inside threads in a Rails application

I've got a Rails application in which a small number of actions require significant computation time. Rather than going through the complexity of managing these actions as background tasks, I've found that I can split the processing into multiple threads and by using JRuby with a multicore sever, I can ensure that all threads complete in...

How to run WCF IPC (http) on localhost without requesting administrative privileges?

We're developing a set of applications that need to communicate with each other on the user's session. These applications do not require any administrative privileges to run, but as soon as one of them tries to open an http listener - it fails due to lack of the administrative credentials. On the other hand, since user doesn't have any a...

Are Interlocked* functions useful on shared memory?

Two Windows processes have memory mapped the same shared file. If the file consists of counters, is it appropriate to use the Interlocked* functions (like InterlockedIncrement) to update those counters? Will those synchronize access across processes? Or do I need to use something heavier, like a mutex? Or perhaps the shared-memory me...

Fastest way to send data over internet between ruby programs?

Hi, what's the best way to pass data between two ruby programs over the internet? The data is small and needs to be passed frequently. Also, since this happening over the internet, it needs to be secure. I'd appreciate any help, extra points for a pointer to some guides on this topic. ...

Call unmanged Code from C# - returning a struct with arrays

[EDIT] I changed the source as suggested by Stephen Martin (highlighted in bold). And added the C++ source code as well. Hi, I'd like to call an unmanaged function in a self-written C++ dll. This library reads the machine's shared memory for status information of a third party software. Since there are a couple of values, I'd like to ...

What's the fastest Perl IPC/message queue for a single machine?

I'm working on a (primarily) Perl project and want to use a message queue to isolate processes from each other. I have a work flow like this: Input -> Receiver -> Processor(s) -> Output(s) I need to handle several hundred transactions/second, so speed my biggest motivator. What is the fastest message queue system for this type of setup...

Using message queue between unrelated processes

Hello, I am trying to use a message queue for communication between two unrelated processes in Linux. I am aware that using a common key value will allow us to open the same message queue in both the unrelated processes. But the problem is that at times a key value corresponding to a message queue might already be used by some system ut...

Reliable non-network IPC in Java

Is there a reliable, cross-platform way to do IPC (between two JVMs running on the same host) in Java (J2SE) that doesn't rely on the network stack? To be more specific, I have a server application that I'd like to provide a small "monitoring" GUI app for. The monitor app would simply talk to the server process and display simple status...

IPC between Python and C#

I want to pass data between a Python and a C# application in Windows (I want the channel to be bi-directional) In fact I wanna pass a struct containing data about a network packet that I've captured with C# (SharpPcap) to the Python app and then send back a modified packet to the C# program. What do you propose ? (I rather it be a fast m...

Interoperate between C# and Java using web services without a Java EE application server?

I'm in a difficult position: We have a 3rd party enterprise system that exposes a Java-based API. However, we are a 100% .Net oriented development team. Essentially, I need to wrap the Java API with something that C# code can call. Web services would be great, but the only Java application server supported on our infrastructure is ...