04-24-2012 08:33 PM
I have a .bar-file with several executables placed in native/bin directory. I would like to launch them when needed from my main Qt application (specified as entry point).
QString program = "app/native/bin/test";
QProcess *myProcess = new QProcess(parent);
qDebug() << "PROC: " << myProcess->state() << " " << myProcess->error();
I get empty tmp/stderr and tmp/stdout and PROC: 0 0 in my logs/log file. So it seems to me, that QProcess does not start processes. Is it even possbile in sandbox?
04-25-2012 06:46 AM - edited 04-25-2012 06:47 AM
I've tried to use execv() call to spawn a process. It've returned a -1 return value which indicates a failure and have set the errno variable to EINVAL (22). Blackberry C library documentation does not mention EINVAL as a possible errno for this call: https://bdsc.webapps.blackberry.com/native/referen
04-25-2012 10:38 AM
I suspect QProcess uses fork() and it does not work on PlayBook for multithreaded applications (see Caveats here https://bdsc.webapps.blackberry.com/native/referen
08-23-2012 01:48 AM
Just a tad of an update... I looked at the Qt 4.8 source code, and QProcess is supposed to use spawn() on QNX. However, one of the inheritance struct flags its passing to spawn() (SPAWN_SETSID) seems to prevent the call from executing successfully. If you call spawn() without that flag, it seems to work just fine.
So either we need a workaround for this, or we just have to spawn() and I/O redirect from external processes the hard way.