I try to explain the situation:

I have a QT application written in C++ and QT.
This QT application starts a separate console C++ application that runs in the background.
These two communicate using perhaps sockets, don't know yet.
Console C++ application needs to start and stop my gnuradio python script. Also it needs to send parameters to it.
Once started, this gnuradio script runs independedly in infinite loop sending information to either the console or the QT application using sockets perhaps.
My console application needs to stop this gnuradio script from running when the order is given by the QT application.

The question is how can I stop this separate python script from my C++ console application ? Also is there anything I could do to make this more simple ?
Regards,
Spitz
Spawn python script as a new process using fork() and execv(). execv() (or any other function of the exec family) lets you pass arguments to the Python script. Use the child process ID to send a kill signal when you are done with the Python script.
Best way to start, stop and send parameters to separate Python script from C++ application?