| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 2 | |
Hi all, I am having trouble starting multiple jobs using QProcess. I have looked through the mail archives, but I haven't found anything that seems to help. In essense, I am trying to write a gui job scheduler. Attached is a very simplified version that demonstrates the problems I am having. The attached program tries to run 20 jobs where each "job" consists of running a csim process followed by a vsim process. For this example, both the csim and vsim process are "sleep 5". So the behavior should be when you say go, the first 5 csim jobs (sleep 5) are started. When these complete, the first 5 vsim jobs should start (again, sleep 5). When the vsim jobs complete, the next 5 csim jobs should run, and so on. What I actually see is non-deterministic behavior where by it seems that when some jobs complete, the code is not notified, and "isRunning()" seems to indicate the job is still running. So over time, less and less jobs are making progress. I have the feeling that the problem is due in part to the asynchronous nature of the SIGCHLDs that come back, but this doesn't seem to explain everything, and I can't figure out how to fix it. I am running this under Linux. I am using qt-2.2.2. qt was compiled with the -threads (I wanted to -D_REENTRANT flag during the build -- I am not actually using threads). Thanks for any help. Chris <<TEST.TAR>>
Attachment:
TEST.TAR
Description: Binary data
Hi, > I am having trouble starting multiple jobs using QProcess. [...] QProcess is not a class in Qt (yet). So I guess you are using the class in the designer directory, right? This is old code. This is buggy code. This is code that is not supposed to be in Qt (for these and several other reasons). I guess the problem you describe is related to this fact. I can send you (in a private mail) the actual code, if you are intrested. Bye, Rainer. -- [ signature omitted ]