Questions tagged [ipc]

IPC stands for Inter-process Communication and represents a set of methods for exchanging data and messages between threads and processes.

In computing, Inter-process communication (IPC) is a set of methods for the exchange of data among multiple threads in one or more processes. Processes may be running on one or more computers connected by a network. IPC methods are divided into methods for:

  • message passing
  • synchronization
  • shared memory, and
  • remote procedure calls (RPC).

The method of IPC used may vary based on the bandwidth and latency of communication between the threads, and the type of data being communicated.

There are several reasons for providing an environment that allows process cooperation:

  • Information sharing
  • Speedup
  • Modularity
  • Convenience
  • Privilege separation

IPC may also be referred to as inter-thread communication and inter-application communication.

The combination of IPC with the address space concept is the foundation for address space independence/isolation.

4538 questions
2
votes
1 answer

Returning value from child process to parent process using exit() and wait() in C

The value of status is not returned correctly from the child to the parent process. #include #include #include #include #include #include #define BUF_SIZE 200 int main(void){ pid_t…
minzey
  • 116
  • 2
  • 11
2
votes
1 answer

Is it OK to have an empty while block when using WaitOne with named mutexes for IPC?

Basically, multiple instances of the same process will do this: using (var mutex = new System.Threading.Mutex(false, MUTEX_NAME)) { while (!mutex.WaitOne(100)) { /* wait to acquire mutex from other process */ } try { …
Joseph Nields
  • 5,527
  • 2
  • 32
  • 48
2
votes
0 answers

Unified Shared Memory Systems

I am working with some older real-time control system code written using the RTAI extensions to Linux. I see four different mechanisms in use to create and share memory across process boundaries. 1) RTAI shared memory (rt_shm_alloc &…
Speed8ump
  • 1,307
  • 10
  • 25
2
votes
1 answer

Bidirectional communication using a single UNIX socket

I have the situation where a service running in the background makes itself available for ASCII-based commands via a socket (SOCK_DGRAM) placed on the file system. I am able to successfully send commands to this interface but cannot receive any…
sherrellbc
  • 4,650
  • 9
  • 48
  • 77
2
votes
1 answer

peer to multi-peer interprocess communication

What is the best method for peer to multi-peer interprocess communication in windows. ( One application will send interrupts to many listeners ) One method comes to my mind is to use SendMessage with the HWND_BROADCAST parameter. What else I can do?
user380976
  • 21
  • 1
2
votes
0 answers

How to use "POSIX Message Queues" from Linux kernel in mono?

POSIX message queues seems to be exactly what I need to pass command line arguments to existing running instance of the same application. http://man7.org/tlpi/download/TLPI-52-POSIX_Message_Queues.pdf they're like a Priority-queue channel between…
user1709408
  • 528
  • 4
  • 16
2
votes
1 answer

Pass program output to a DirectShow source filter to be picked up by Lync?

Goal Broadly, I want to accomplish the following: Generate a series of images in real-time from a program Pass the images to a DirectShow source filter, which is registered as a capture source Select the resulting "virtual webcam" in a program like…
Aaron Zou
  • 414
  • 3
  • 9
2
votes
2 answers

How to combine GUI applications in Windows

I have a Windows GUI application that's using the Qt framework (currently version 3.3.5, might change to Qt4). I want to combine other Windows GUI applications in the main application. I can't use the widgets directly in the main application due to…
kshahar
  • 10,423
  • 9
  • 49
  • 73
2
votes
0 answers

Communicate with long running child process via stdin and stdout

Sorry, I imagine this has to have been asked before, but for some reason I can't seem to find an answer. I am trying to launch a long running child process such as an REPL (lein repl, python) and communicate with it via stdin/stdout. I have found…
Weebs
  • 435
  • 6
  • 17
2
votes
1 answer

Theos inter-app communication using mach ports

I am trying to send data between an App and a console app (using theos) on iOS 8. I have tried: Application: CFMessagePortRef port = CFMessagePortCreateLocal(kCFAllocatorDefault, CFSTR("co.test"), &message_callback, NULL, NULL); This works fine.…
logikal
  • 1,123
  • 13
  • 26
2
votes
4 answers

Calling a Python program from PHP

I've got a version of the A* algorithm that builds a graph of the UK road and cycle network in Python lists. It takes about 30 seconds to initialise, but once done can very quickly find the shortest route between any two vertices. The start and…
Simon Nuttall
  • 394
  • 1
  • 3
  • 12
2
votes
1 answer

Can I use STDIN for IPC?

Can I use standard input for interprocess communication? I wrote the following gnu c code as an experiment, but the program hangs waiting for input after printing the character defined as val. Neither a newline nor fflush in the sending process seem…
motoku
  • 1,571
  • 1
  • 21
  • 49
2
votes
1 answer

How to share COM objects between 2 processes?

I want Application1.exe to instantiate an instance of its Item class. I want Application2.exe to call GetPrice() on this object. I have followed steps 1-7 on the following…
yxrkt
  • 424
  • 4
  • 12
2
votes
0 answers

C++ to C# named pipe hangs on client read

C++ named pipe server code this code is executed once. LPTSTR lpszPipename = "\\\\.\\Pipe\\D2MSPipe"; hPipe = ::CreateNamedPipe(lpszPipename, PIPE_ACCESS_OUTBOUND, PIPE_TYPE_MESSAGE, // |…
Dave
  • 2,774
  • 4
  • 36
  • 52
2
votes
1 answer

Mailslot blocking forever

I decided to use mailslot for IPC. On windows 8 everything works fine. But on Windows Xp I receive fine first message but then the call to ReadFile gets stuck. Here is my test code: procedure TForm1.Button1Click(Sender: TObject); var hand :…
opc0de
  • 11,557
  • 14
  • 94
  • 187