]> git.donarmstrong.com Git - mothur.git/blobdiff - filterseqscommand.cpp
cluster.split fix
[mothur.git] / filterseqscommand.cpp
index c4a3a95fe7d2cff8948650ebabea4290fbaa742a..b9436f8078df0da22408dafc889d16e62d8a7d6c 100644 (file)
@@ -610,7 +610,11 @@ int FilterSeqsCommand::createProcessesRunFilter(string F, string filename) {
                                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
@@ -974,7 +978,11 @@ int FilterSeqsCommand::createProcessesCreateFilter(Filters& F, string filename)
                                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);
+                       }
                }
                
                //parent do your part