X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=chimeraccodecommand.cpp;h=b266025f1720d5c0ef7366d1ee7d155182f3fa21;hb=HEAD;hp=d890db4087813cc3c4c4e453b55013fa555e7689;hpb=d39f94cf9bceeae887b211eec862da5c9c77e10d;p=mothur.git diff --git a/chimeraccodecommand.cpp b/chimeraccodecommand.cpp index d890db4..b266025 100644 --- a/chimeraccodecommand.cpp +++ b/chimeraccodecommand.cpp @@ -633,17 +633,17 @@ int ChimeraCcodeCommand::createProcesses(string outputFileName, 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 process++; }else if (pid == 0){ - num = driver(lines[process], outputFileName + toString(getpid()) + ".temp", filename, accnos + toString(getpid()) + ".temp"); + num = driver(lines[process], outputFileName + toString(m->mothurGetpid(process)) + ".temp", filename, accnos + toString(m->mothurGetpid(process)) + ".temp"); //pass numSeqs to parent ofstream out; - string tempFile = outputFileName + toString(getpid()) + ".num.temp"; + string tempFile = outputFileName + toString(m->mothurGetpid(process)) + ".num.temp"; m->openOutputFile(tempFile, out); out << num << endl; out.close();