]> git.donarmstrong.com Git - mothur.git/blobdiff - screenseqscommand.cpp
cluster.split fix
[mothur.git] / screenseqscommand.cpp
index 30dda1f68518bf395ae0cbb892cf71a3a7ded4d5..98b6681d5091ffbb30b80172c0a36d12a531d130 100644 (file)
@@ -721,7 +721,11 @@ int ScreenSeqsCommand::createProcessesCreateSummary(vector<int>& startPosition,
                                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);
+                       }
                }
                
                num = driverCreateSummary(startPosition, endPosition, seqLength, ambigBases, longHomoPolymer, fastafile, lines[0]);
@@ -1046,7 +1050,11 @@ int ScreenSeqsCommand::createProcesses(string goodFileName, string badAccnos, st
                                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