]> git.donarmstrong.com Git - mothur.git/blobdiff - pairwiseseqscommand.cpp
cluster.split fix
[mothur.git] / pairwiseseqscommand.cpp
index aed03cd9ea273fe5e42413fc1c709abe01983e94..18412fdeac778159551d32e8573edd1dddc321bf 100644 (file)
@@ -536,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