]> git.donarmstrong.com Git - mothur.git/blobdiff - aligncommand.cpp
fixed metastats, added resize to cluster.classic, added code to kill children if...
[mothur.git] / aligncommand.cpp
index 8a229e3cade2cff57569e16b0e4b682d8dd0be65..87ca6cbf64f873797aebb733ebb727b2e6f840f0 100644 (file)
@@ -64,6 +64,7 @@ vector<string> AlignCommand::getRequiredFiles(){
 //**********************************************************************************************************************
 AlignCommand::AlignCommand(){  
        try {
+               abort = true;
                //initialize outputTypes
                vector<string> tempOutNames;
                outputTypes["fasta"] = tempOutNames;
@@ -849,7 +850,11 @@ int AlignCommand::createProcesses(string alignFileName, string reportFileName, s
                                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);
+                       }
                }
                
                //force parent to wait until all the processes are done