interprocess

C#: Read and modify settings in another application's app.config file

断了今生、忘了曾经 提交于 2019-12-06 11:53:12
I have a number of applications running which communicate with each other but none of these applications have their own user interface. I have a system console application which acts as a user interface for the system (i.e. the set of applications which all talk to each other). I would like to be able to use the system console to read and modify the configuration of each of the non-gui apps. Each app has an app.config file created using the Visual Studio Settings GUI. The settings are all in application scope, which results in an app.config file which looks a bit like this: <?xml version="1.0"

Memory Mapped Files, Managed Mapped File and Offset Pointer

巧了我就是萌 提交于 2019-12-06 08:42:35
问题 I'm a little bit confused about the terminology of Boost Library (for windows). What I'm trying to do is simply; create a file on disk (a big file >50 GB) do some mapping for write and read operations seperately. For example first map 1 gb portion for writing & after that flush it to the hard drive take a new portion and so on, while the reader applications maps different parts of the file and do the reading stuff without changing anything (no edit). I'm reading the documentation of boost (1

Interprocess communication between C# and Python

让人想犯罪 __ 提交于 2019-12-06 06:02:27
I can understand that there has been a lot of questions on this topic but none of them could really solve my problem. So here I have presented my code, and I want my mistakes to be pointed out here. I have a program written in C# which shall call a python executable/file. The first requirement is that I have pass one argument to the python file via the input stream. This I could do. The real problem I am facing now is that, I have to see whether my python file is printing "Please enter argument_x", I have to read this output in my C# code and check if it is argument_x, then only write the

Communication between different C# based services

淺唱寂寞╮ 提交于 2019-12-05 18:46:29
Is there a way to communicate between two different services? I have a service that already runs. Is there a way to create a second service that can attach to the first service and send and receive dates to it? I would also like to access the Windows service from a console application and attach to it. Is it possible? James Kyburz To begin with I would play around with tcpclient and tcpserver http://msdn.microsoft.com/en-us/library/system.net.sockets.tcpclient.aspx http://msdn.microsoft.com/en-us/library/system.net.sockets.tcplistener.aspx Even if the data you need to send is more complex than

Is it possible to load a function into some allocated memory and run it from there?

烈酒焚心 提交于 2019-12-05 15:21:53
I'm messing around with some interprocess communication stuff and I am curious if it's possible to copy a function into some shared memory and run it from there from either process. Something like: memcpy(shared_memory_address, &func, &func + sizeof(func)); I realize you can't take the size of the function but that was what popped into my head. Theoretically, as functions are just sequence of byte code somewhere in the memory, you could copy the memory block of the function and call (jump into) it. Though c++ Abstracts that possibility away, as you noticed, we cannot actually know the size of

Is there an 'upgrade_to_unique_lock' for boost::interprocess?

百般思念 提交于 2019-12-05 13:52:10
I am looking for the best way to effectively share chunks of data between two (or more) processes in a writer-biased reader/writer model. My current tests are with boost::interprocess . I have created some managed_shared_memory and am attempting to lock access to the data chunk by using an interprocess mutex stored in the shared memory. However, even when using sharable_lock on the reader and upgradable_lock on the writer, the client will read fragmented values during write operations instead of blocking . While doing a similar reader/writer setup between threads in a single process, I used

Do I have to close inherited handle later owned by child process?

走远了吗. 提交于 2019-12-05 03:38:04
Microsoft played safe here. In their article, "Creating a Child Process with Redirected Input and Output" , they are saying: The remaining open handles are cleaned up when this process terminates. To avoid resource leaks in a larger application, close handles explicitly. Which is perfectly useless. What handles? In which process? I want to get my head around it. When a handle is created in parent process with SECURITY_ATTRIBUTES.bInheritHandle = TRUE , a child process can see and use it, and the handle has the same value and access rights in both processes. But is it the same handle, or is it

Boost Message Queue not based on POSIX message queue? Impossible to select(2)?

天涯浪子 提交于 2019-12-04 20:39:36
问题 I thought I'd use Boost.Interprocess's Message Queue in place of sockets for communication within one host. But after digging into it, it seems that this library for some reason eschews the POSIX message queue facility (which my Linux system supports), and instead is implemented on top of POSIX shared memory. The interface is similar enough that you might not guess this right away, but it seems to be the case. The downside for me is that shared memory obtained via shm_open(3) does not appear

Memory Mapped Files, Managed Mapped File and Offset Pointer

落爺英雄遲暮 提交于 2019-12-04 13:49:06
I'm a little bit confused about the terminology of Boost Library (for windows). What I'm trying to do is simply; create a file on disk (a big file >50 GB) do some mapping for write and read operations seperately. For example first map 1 gb portion for writing & after that flush it to the hard drive take a new portion and so on, while the reader applications maps different parts of the file and do the reading stuff without changing anything (no edit). I'm reading the documentation of boost (1.47.0 version since we allowed to use this one) and I don't understand exactly when to use Memory Mapped

Is it possible to share a Cuda context between applications?

最后都变了- 提交于 2019-12-04 08:54:30
I'd like to pass a Cuda context between two independent Linux processes (using POSIX message queues, which I already have set up). Using cuCtxPopCurrent() and cuCtxPushCurrent() , I can get the context pointer, but this pointer is referenced in the memory of the process in which I call the function, and passing it between processes is meaningless. I'm looking for other solutions. My ideas so far are: Try to deep copy the CUcontext struct, and then pass the copy. See if I can find a shared-memory solution where all my Cuda pointers are placed there so both processes can access them. Merge the