m_bishop
25th May 2013, 00:25
I am trying to run 100 instances of a program in the background. I get to 51 and my Qt app locks up with "QProcess : Destroyed while process is still running."
So I am thinking that maybe I am running into some sort of linux max limit of something (memory, sockets, whatever). So I create a bash script that creates 100 instances of my app and puts each one in the background with no problem.
And now I am stuck.
Here is how I am calling it:
{
QProcess* process = new QProcess();
QString program = "my_program cmdline_option_1 cmdline_option_2";
process->start(program);
}
and this is called from a clicked() event.
Added after 4 minutes:
Maybe I should be using:
process->startDetached(program);
Added after 30 minutes:
Nothing to see here...move along......
So I am thinking that maybe I am running into some sort of linux max limit of something (memory, sockets, whatever). So I create a bash script that creates 100 instances of my app and puts each one in the background with no problem.
And now I am stuck.
Here is how I am calling it:
{
QProcess* process = new QProcess();
QString program = "my_program cmdline_option_1 cmdline_option_2";
process->start(program);
}
and this is called from a clicked() event.
Added after 4 minutes:
Maybe I should be using:
process->startDetached(program);
Added after 30 minutes:
Nothing to see here...move along......