]> git.donarmstrong.com Git - mothur.git/blobdiff - unweighted.cpp
cluster.split fix
[mothur.git] / unweighted.cpp
index 0ac7147d7d8b0b288789267c18c43e1867b43e93..ef9e52188ed32bcea6bf009231bf6c9a0c26ee4a 100644 (file)
@@ -116,7 +116,11 @@ EstOutput Unweighted::createProcesses(Tree* t, vector< vector<string> > namesOfG
                                out.close();
                                
                                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); 
+                       }
                }
                
                results = driver(t, namesOfGroupCombos, lines[0].start, lines[0].num);
@@ -363,7 +367,11 @@ EstOutput Unweighted::createProcesses(Tree* t, vector< vector<string> > namesOfG
                                out.close();
                                
                                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); 
+                       }
                }
                
                results = driver(t, namesOfGroupCombos, lines[0].start, lines[0].num, usingGroups);