On Wednesday, April 6, 2016 10:47:39 AM CEST Duane wrote: > On 06/04/2016 10:39 AM, Konstantin Tokarev wrote: > > > > > > 06.04.2016, 17:36, "Duane" <duane.heb...@group-upc.com>: > >> Qt 5.3, on TinyCore Linux 5 and Fedora 23. > >> > >> I'm currently using a call to std::system to load a module with insmod. > >> This works but I would like to do it with QProcess. > > > > Why? > > > > > I want to wait for finished with a timeout. > > >> This also works > >> but I can't seem to get the return value of the insmod call like I can > >> with std::system. Any suggestions? > > > > QProcess::exitCode() > > > > > This works in the sense that it returns 0 when there's no error but it > doesn't seem to return the return value from insmod. For example, > insmod returns 4531 when the file is already loaded but > QProcess::exitCode is 17. I can rmmod module I guess. > > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest >
http://doc.qt.io/qt-5/qprocess.html#waitForFinished should be what you are looking for. You also could connect the finished signal which is emitted as soon as the QProcess has finished (http://doc.qt.io/qt-5/qprocess.html#finished) _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest