-
QProcess hangs
Hi,
specs : QT 4.1.3 on Windows 2000
I'm using QProcess to run a external program (gcc compiler). It looks like that as soon as the external program gives too much standard output (in this case compiler warnings from the gcc compiler) the external program hangs and QProcess doesn't return. Anybody here who knows something about this or how to fix it ??
-
Re: QProcess hangs
You have to empty the pipe between QProcess and the application by reading the data. If you're not interested in the data, call QProcess::closeReadChannel() before starting the process.
-
Re: QProcess hangs
Hi,
Thanx for the reply. I started to investigate way QT channels the output data, but I can't find enough backgrounddata on this topic. QT nicely describes the functions, but not the underlying idea of the functions. Do you have a link to more info on how the dataflow works ??
-
Re: QProcess hangs
You can directly check the Qt sources :)
For example, it helped me a lot to see the graphicsview framework sources to reimplement some methods.
-
Re: QProcess hangs
The dataflow is like in any other simmilar case - when you run a process pipes are created and attached to stdin, stdout and stderr of the application under control and given to the controlling application to read/write data to it. When the "stdout" pipe fills, a subsequent call to write() blocks until there is some space in the pipe buffer. That's why you need to either read the data or discard the pipe.