Questions tagged [interprocess]

A capability supported by some operating systems that allows one process to communicate with another process. The processes can be running on the same computer or on different computers connected through a network. It enables one application to control another application, and for several applications to share the same data without interfering with one another.

412 questions
3
votes
5 answers

Communication (interprocess) between applications

I'm about to write a "server" application that is responsible to talk with external hardware. The application shall handle requests from clients. The clients send a message to the server, and if the server is busy with doing stuff with the hardware…
anra
  • 117
  • 7
3
votes
1 answer

Boost.Interprocess: testcase gives different results if compiled with or without optimization (GCC)

I'm having some troubles with Boost.Interprocess allocators when compiling with optimization. I managed to get this down to a 40 lines testcase, most of which is boilerplate. Just have a look at create() and main() functions in the code…
user319799
3
votes
3 answers

boost interprocess file_lock does not work with multiple processes

I seem to be having an issue with boost::interprocess::file_lock I have process 1 that is essentially boost::interprocess::file_lock test_lock("testfile.csv"); test_lock.lock(); sleep(1000); test_lock.unlock(); When I run a second…
user788171
  • 16,753
  • 40
  • 98
  • 125
3
votes
1 answer

pipe, fork, and non-blocking IPC

So I was trying to run a system command (or exec, or whatever) at a child process after a fork(), and push some input to it, and then get its output. It looks like this after the fork(), and pc and cp is parent-child and child-parent pipes. case…
kamziro
  • 7,882
  • 9
  • 55
  • 78
3
votes
0 answers

Sharing variables in shared library

In the book "The Linux Programming Interface" it reads: Although the code of a shared library is shared among multiple processes, its variables are not. Each process that uses the library has its own copies of the global and static variables that…
ataraxis
  • 1,257
  • 1
  • 15
  • 30
3
votes
3 answers

C# - 2 clientside programs trading variable information -- is there a better way?

I am attempting to send player information from my Game to my network client to then be sent off to the server. Currently the ClientNetwork -> ClientGame relationship is held with XML files. They read/write back and forth at very high speeds. If you…
Remm
  • 677
  • 8
  • 24
3
votes
2 answers

Class design for self-linked classes with generic pointer type

I am currently modifying a complex class that has nodes pointing to themselves just like linked lists or graphs. I want it to be used in shared memory using boost::interprocess functions. Now I am looking for the way to redesign it such that it…
Joh
  • 41
  • 2
3
votes
4 answers

Two WinForms applications

I have 2 different C# programs, both of them contain a form application. How can I run both these 2 programs in one of them? I added, using the existing project option, progr1 in program 2. Now I want to run program2. When program 2 runs and it pops…
elisa
  • 743
  • 2
  • 13
  • 31
3
votes
0 answers

Can serialization be replaced by a simple static_cast to retrieve data shared between two processes in C++?

Let's say I have a process written in C++ that has many instances of class A. class A { std::vector> tab; /* other random data */ } Once created, these objects should be accessed (read-only) by other processes of a…
Norgannon
  • 487
  • 4
  • 16
3
votes
6 answers

Interprocess communication between 32- and 64-bit apps on Windows x64

We'd like to support some hardware that has recently been discontinued. The driver for the hardware is a plain 32-bit C DLL. We don't have the source code, and (for legal reasons) are not interested in decompiling or reverse engineering the…
Brian Gillespie
  • 3,213
  • 5
  • 27
  • 37
3
votes
3 answers

Process.Start vs Process `p = new Process()` in C#?

As is asked in this post, there are two ways to call another process in C#. Process.Start("hello"); And Process p = new Process(); p.StartInfo.FileName = "hello.exe"; p.Start(); p.WaitForExit(); Q1 : What are the pros/cons of each approach? Q2 :…
prosseek
  • 182,215
  • 215
  • 566
  • 871
3
votes
1 answer

Boost.Process - how to make a process run a function?

So I try to do something with Boost.Process though it has not been accepted into the Boost distribution yet. simpliest programm would look like #include #include #include namespace bp = ::boost::process;…
Rella
  • 65,003
  • 109
  • 363
  • 636
3
votes
2 answers

Transfer a pointer through boost::interprocess::message_queue

What I am trying to do is have application A send application B a pointer to an object which A has allocated on shared memory ( using boost::interprocess ). For that pointer transfer I intend to use boost::interprocess::message_queue. Obviously a…
Yordan Pavlov
  • 1,303
  • 2
  • 13
  • 26
3
votes
0 answers

Reference Counting Boost Interprocess Shared Memory

I'm using boost::interprocess to share data between processes via managed shared memory. Clients may read or write to the shared memory. Clients first attempt to open an existing shared memory: managed_shared_memory(open_only, "MySharedMemory"); If…
Stephen Blinkhorn
  • 637
  • 2
  • 7
  • 17
3
votes
3 answers

Are intermediate files bad practice?

I was recently downvoted (which only bugged me a little :) ) for an answer I gave to this question. The person offered no explanation for the down vote which started me thinking: "Why would you avoid producing intermediate files?" Especially in a…
Chris Pfohl
  • 18,220
  • 9
  • 68
  • 111