I'm a QT newbie so apologies if I'm missing something basic. I have a QApplication that calls an external executable. This executable will keep running infinitely, passing data to this QApplication through stdout, unless it's manually exited from by the user running it from console. This process does not wait for stdin while it is running (it's a simple c++ code that's running as an executable that has a while loop).
I want to be able to modify this executable's behavior at runtime by being able to send some form of signal (any kind of signal, even a single byte. Not to be confused with QT's signal/slot) from the QApplication to the external process. I read about QT's IPC and I think QSharedMemory is the easiest way to achieve this. I cannot use any kind of pipes etc since the process is not waiting for stdin.
Is it possible for there to be a QSharedMemory that is shared by the QApplication as a well as a process running externally that is not a QT application. If yes, are there any example someone can point me to; I tried to find some but couldn't. If not, what other options might work in my specific scenario?
Thanks in advance
EDIT: Just to be more clearer, I want to be able to modify the executable's behaviour by making it do other things, than what it's doing at a given time. This can probably be achieved by sending a number or a char that specifies something. The QApplication can close this executable through QProcess so that is not required to be done by sending any signal. If I use stdin of the executable to listen to the signal sent by the QApplication, will it interfere with the stdout of that executable which is being read by the QApplication? I presume not, since they're separate channels, but just wanted to be sure.
Bookmarks