]> git.donarmstrong.com Git - mothur.git/blobdiff - rarefact.cpp
modified reportfile class
[mothur.git] / rarefact.cpp
index d04885f4333e3f224bddbfa99aa9614e9f171b4c..032cd93752db10521d18495aa141888e37720963 100644 (file)
@@ -116,7 +116,7 @@ int Rarefact::createProcesses(vector<int>& procIters, RarefactionCurveData* rcd,
        try {
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
                int process = 1;
-               int num = 0;
+               
                vector<int> processIDS;
                
                EstOutput results;
@@ -137,7 +137,11 @@ int Rarefact::createProcesses(vector<int>& procIters, RarefactionCurveData* rcd,
                                        displays[i]->outputTempFiles(tempFile);
                                }
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                driver(rcd, increment, procIters[0]);