interprocess

Shared but Secure Memory between 3 Different Apps (Windows)

喜欢而已 提交于 2019-12-26 06:49:24
问题 We are writing a set of application for windows which contains IE toolbar, Firefox toolbar and Windows Desktop client. Before using any of these components user provides his secret code and says that he need to save this code for 1hr or whatever option he chooses. Now the challenge for us is that we have to use the same secret code to decrypt his data while he uses in all 3 component, Currently we are writing that secret key in a plain file with AES encryption with a specific key buried in

wait until the previous instance of process finish

[亡魂溺海] 提交于 2019-12-25 08:04:43
问题 I am new to the world of Linux C Programming so request your patience. Found several threads about inter-process synchronization (same process but different instance) using mutex and semaphores but not exactly matching my case. I tried to follow them and tried to create few samples but none of them is working for me. Finally posting here to get some help. I am working on to create a utility which will executed over Ethernet telnet session. As noted below in USAGE comment, 1st call will pass

Controlling a C daemon from another program

 ̄綄美尐妖づ 提交于 2019-12-24 18:31:10
问题 I'm trying to control a C daemon program from another userspace program. - Simple C daemon This daemon is simply a C program which daemonize itself and log a message every second through syslog. #include <stdlib.h> #include <stdio.h> #include <syslog.h> #include <unistd.h> #include <signal.h> void bye(); int main() { printf("Daemon starting ...\n"); openlog("daemon-test", LOG_PID, LOG_DAEMON); signal(SIGTERM, bye); if(0 != daemon(0, 0)) { syslog(LOG_ERR, "Can't daemonize\n"); return EXIT

Using pipes in C for parent-child IPC makes program block

﹥>﹥吖頭↗ 提交于 2019-12-24 08:59:29
问题 I am writing a server which fork()'s off a child process when it accepts a socket connection. As the child communicates with a client, it must send some of that information back to the parent. I am using a pipe to accomplish this. The problem is that when I try to do the parent-child IPC, the parent blocks when reading input from the child. Which means that, even though the children are running concurrently, they can only be processed one-at-a-time because they are all waiting for the parent.

How to print out the value that subprocess prints with C#?

纵然是瞬间 提交于 2019-12-23 05:15:28
问题 As is asked in this post, I can use Python's subprocess.Popen() function to print out the value from running ruby's code. import subprocess import sys cmd = ["ruby", "/Users/smcho/Desktop/testit.rb"] p = subprocess.Popen(cmd, stdout=subprocess.PIPE) for line in iter(p.stdout.readline, ''): print line, sys.stdout.flush() p.wait() How can I do the same thing with C#? How can one print the value what the subprocess prints out? 回答1: You need to redirect stdout when spawning the child process;

Interprocess communication between C# and Python

耗尽温柔 提交于 2019-12-22 21:44:44
问题 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

Interprocess communication via Pipes

你说的曾经没有我的故事 提交于 2019-12-22 09:28:06
问题 It is known that during Interprocess Communication in Linux, the processes communicate with each other through a special file named as "Pipe" . It is also known that the the operations performed on that file is write by one process and read by one process in order to communicate with each other. Now, the question is : Do these write and read operations are performed in parallel during the communication (operations are executed parallely) ? and if not than, What happens when one of the process

Communication between different C# based services

跟風遠走 提交于 2019-12-22 08:06:44
问题 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? 回答1: 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

Receive WM_COPYDATA struct in WPF or Console C# app

天涯浪子 提交于 2019-12-22 04:48:18
问题 I am writing a C# application that needs to communicate with another application written in native C. So far I have figured out how to send messages from my C# app to the C app with the User32.dll SendMessage. However I am unable to figure out how to get the C# app to RECEIVE messages from the C app. I have seen WinForms examples of overriding the WndProc method, but there is no WndProc method to override in a WPF or Console application. Surely it's possible to do in a Console application at

Is it possible to share a Cuda context between applications?

99封情书 提交于 2019-12-21 17:49:02
问题 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