X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=shhhercommand.cpp;h=282b1284c94f6208a659a5b8ea1c30b5c5cad7cc;hb=a89c6295ae9a35fcaaab7fa50dcb68360dd543b0;hp=7fa99f1b04fd2632bf4d6e59ab08db6d1a38c1d9;hpb=a935b75dd890da5ae7f09e5e6179f90ab2955348;p=mothur.git diff --git a/shhhercommand.cpp b/shhhercommand.cpp index 7fa99f1..282b128 100644 --- a/shhhercommand.cpp +++ b/shhhercommand.cpp @@ -2070,17 +2070,17 @@ int ShhherCommand::createProcesses(vector filenames){ //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(dividedFiles[process], compositeFASTAFileName + toString(getpid()) + ".temp", compositeNamesFileName + toString(getpid()) + ".temp"); + num = driver(dividedFiles[process], compositeFASTAFileName + m->mothurGetpid(process) + ".temp", compositeNamesFileName + m->mothurGetpid(process) + ".temp"); //pass numSeqs to parent ofstream out; - string tempFile = compositeFASTAFileName + toString(getpid()) + ".num.temp"; + string tempFile = compositeFASTAFileName + m->mothurGetpid(process) + ".num.temp"; m->openOutputFile(tempFile, out); out << num << endl; out.close();