X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=chimerapintailcommand.cpp;h=0b8e5940777090cdc6aef97829c63f96ad4503d8;hb=a89c6295ae9a35fcaaab7fa50dcb68360dd543b0;hp=fca9f176d9e66c8452a8da5c451eba71ca76d6eb;hpb=bcb6728939694811bf6a00ae6d568f783840edfd;p=mothur.git diff --git a/chimerapintailcommand.cpp b/chimerapintailcommand.cpp index fca9f17..0b8e594 100644 --- a/chimerapintailcommand.cpp +++ b/chimerapintailcommand.cpp @@ -720,17 +720,17 @@ int ChimeraPintailCommand::createProcesses(string outputFileName, string filenam //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();