]> git.donarmstrong.com Git - mothur.git/blobdiff - clustersplitcommand.cpp
cluster.split fix
[mothur.git] / clustersplitcommand.cpp
index 6b5012abaa755ad9c72e61d4ece9ad488782b5bd..85a183aca409f65e3cb0e605d5ae777d10efe665 100644 (file)
@@ -885,7 +885,11 @@ int ClusterSplitCommand::createProcesses(vector < vector < map<string, string> >
                                outLabels.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);
+                       }
                }
                
                //force parent to wait until all the processes are done