]> git.donarmstrong.com Git - mothur.git/blobdiff - pairwiseseqscommand.cpp
fixed metastats, added resize to cluster.classic, added code to kill children if...
[mothur.git] / pairwiseseqscommand.cpp
index 733c47063bad878d8a54b061cc06e28fa2c7618c..18412fdeac778159551d32e8573edd1dddc321bf 100644 (file)
@@ -61,6 +61,7 @@ vector<string> PairwiseSeqsCommand::getRequiredFiles(){
 //**********************************************************************************************************************
 PairwiseSeqsCommand::PairwiseSeqsCommand(){    
        try {
+               abort = true;
                //initialize outputTypes
                vector<string> tempOutNames;
                outputTypes["phylip"] = tempOutNames;
@@ -535,7 +536,11 @@ void PairwiseSeqsCommand::createProcesses(string filename) {
                                if (output != "square") {  driver(lines[process]->start, lines[process]->end, filename + toString(getpid()) + ".temp", cutoff); }
                                else { driver(lines[process]->start, lines[process]->end, filename + toString(getpid()) + ".temp", "square"); }
                                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 (map<int, int>::iterator it = processIDS.begin(); it != processIDS.end(); it++) { int temp = it->second; kill (temp, SIGINT); }
+                               exit(0);
+                       }
                }
        
                //force parent to wait until all the processes are done