Combining node.js and Python

This sounds like a scenario where zeroMQ would be a good fit. It’s a messaging framework that’s similar to using TCP or Unix sockets, but it’s much more robust (http://zguide.zeromq.org/py:all) There’s a library that uses zeroMQ to provide a RPC framework that works pretty well. It’s called zeroRPC (http://www.zerorpc.io/). Here’s the hello world. Python “Hello … Read more

Inno Setup Get progress from .NET Framework 4.5 (or higher) installer to update progress bar position

The following shows Pascal Script implementation of the code from How to: Get Progress from the .NET Framework 4.5 Installer [Files] Source: “NDP462-KB3151800-x86-x64-AllOS-ENU.exe”; Flags: dontcopy [Code] // Change to unique names const SectionName=”MyProgSetup”; EventName=”MyProgSetupEvent”; const INFINITE = 65535; WAIT_OBJECT_0 = 0; WAIT_TIMEOUT = $00000102; FILE_MAP_WRITE = $0002; E_PENDING = $8000000A; S_OK = 0; MMIO_V45 = … Read more

Socketpair() in C/Unix

You can use socketpair only where you create both processes, like so: call socketpair – now you have two socket file descriptors (two ends of a single pipe) nominate one end to be the parent and one to be the child end. It doesn’t matter which, just make a choice and stick to it later … Read more

fastest (low latency) method for Inter Process Communication between Java and C/C++

Just tested latency from Java on my Corei5 2.8GHz, only single byte send/received, 2 Java processes just spawned, without assigning specific CPU cores with taskset: TCP – 25 microseconds Named pipes – 15 microseconds Now explicitly specifying core masks, like taskset 1 java Srv or taskset 2 java Cli: TCP, same cores: 30 microseconds TCP, … Read more

How to pass a variable from a child process (fork by Parallel::ForkManager)?

I think you’re misunderstanding what a fork does. When you successfully fork, you’re creating a subprocess, independent from the process you started with, to continue doing work. Because it’s a separate process, it has its own memory, variables, etc., even though some of these started out as copies from the parent process. So you’re setting … Read more

Reading from a text field in another application’s window

For reading text content from another application’s text box you will need to get that text box control’s window handle somehow. Depending on how your application UI is designed (if it has a UI that is) there are a couple of different ways that you can use to get this handle. You might use “FindWindow”https://stackoverflow.com/”FindWindowEx” … Read more

Share condition variable & mutex between processes: does mutex have to locked before?

To be shareable between processes a mutex needs to be initialised accordingly via a properly initialised attribute: http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutexattr_setpshared.html #include <pthread.h> … pthread_mutex_t * pmutex = NULL; pthread_mutexattr_t attrmutex; /* Initialise attribute to mutex. */ pthread_mutexattr_init(&attrmutex); pthread_mutexattr_setpshared(&attrmutex, PTHREAD_PROCESS_SHARED); /* Allocate memory to pmutex here. */ /* Initialise mutex. */ pthread_mutex_init(pmutex, &attrmutex); /* Use the mutex. */ … Read more