|Please understand that I am asking here and it is NOT a Qt question.
My task is to start a new process - the parameters are "application" and its parameters.
The basic process builds a "Database" and I am not so sure about "bin/sh" - I guess it "runs" a shell...
It works and there is no need to get into why at this point.
The "problem" is - the "process" is running and I need to interact with it.
I can use "write" but I have no idea when and where and how.
In the enclosed snippet the "info\n" is "send" to the file ( shell?) before it is finished...
I do understand that Qt process can "wait for finished " and I can also get a SIGNAL when the file is actually done building. What I do not get - if the process is actually /physically building / writing a file - what does "wait for finished " waiting for ?
Again - I am not asking how to code Qt , I am asking how to code so I can "write" the additional stuff in right time.
std::string Database = BT_DATABASE_TEST;
std::string Command = "bluetoothctl ";
std::string command = Command + std::string(" | tee ") + Database + std::string(" | tee /tmp/temp");
QP->start("/bin/sh", QStringList() << "-c" << command.c_str());
qDebug()<< "TEST QProcess CONTINUE DEBUG point @line " << QString::number(__LINE__);
QP->write("info\n"); writes too soon
qDebug() << QP->readAllStandardError();
qDebug() << QP->readAllStandardOutput();