X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=filterseqscommand.cpp;h=6041c95d59952fbaf1c856055181d4e145c3a9c0;hb=aca78ed4a47dff8672ea8fd93cef0dfbaf0f7495;hp=4ac3381d384edf1979f78c911381e040666b8afe;hpb=d1faab5efe1c28700890bdec5b4d8e817fa1dab2;p=mothur.git diff --git a/filterseqscommand.cpp b/filterseqscommand.cpp index 4ac3381..6041c95 100644 --- a/filterseqscommand.cpp +++ b/filterseqscommand.cpp @@ -653,18 +653,18 @@ int FilterSeqsCommand::createProcessesRunFilter(string F, string filename, strin //loop through and create all the processes you want while (process != processors) { - int pid = fork(); + pid_t pid = fork(); if (pid > 0) { processIDS.push_back(pid); //create map from line number to pid so you can append files in correct order later process++; }else if (pid == 0){ - string filteredFasta = filename + toString(getpid()) + ".temp"; + string filteredFasta = filename + m->mothurGetpid(process) + ".temp"; num = driverRunFilter(F, filteredFasta, filename, lines[process]); //pass numSeqs to parent ofstream out; - string tempFile = filename + toString(getpid()) + ".num.temp"; + string tempFile = filename + m->mothurGetpid(process) + ".num.temp"; m->openOutputFile(tempFile, out); out << num << endl; out.close(); @@ -1079,7 +1079,7 @@ int FilterSeqsCommand::createProcessesCreateFilter(Filters& F, string filename) //loop through and create all the processes you want while (process != processors) { - int pid = fork(); + pid_t pid = fork(); if (pid > 0) { processIDS.push_back(pid); //create map from line number to pid so you can append files in correct order later @@ -1095,7 +1095,7 @@ int FilterSeqsCommand::createProcessesCreateFilter(Filters& F, string filename) num = driverCreateFilter(F, filename, lines[process]); //write out filter counts to file - filename += toString(getpid()) + "filterValues.temp"; + filename += m->mothurGetpid(process) + "filterValues.temp"; ofstream out; m->openOutputFile(filename, out);