X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sffmultiplecommand.cpp;h=365bb93dc503b65025da52ec2fc11bf21dad5b92;hb=aca78ed4a47dff8672ea8fd93cef0dfbaf0f7495;hp=f75662b30f258ecf30b3e20e79a76362f633c069;hpb=89cfcfcc9e648d2f956f2ff419e64ba7907106d2;p=mothur.git diff --git a/sffmultiplecommand.cpp b/sffmultiplecommand.cpp index f75662b..365bb93 100644 --- a/sffmultiplecommand.cpp +++ b/sffmultiplecommand.cpp @@ -747,17 +747,17 @@ int SffMultipleCommand::createProcesses(vector sffFiles, vector //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(sffFiles, oligosFiles, lines[process].start, lines[process].end, fasta + toString(getpid()) + ".temp", name + toString(getpid()) + ".temp", group + toString(getpid()) + ".temp"); + num = driver(sffFiles, oligosFiles, lines[process].start, lines[process].end, fasta + m->mothurGetpid(process) + ".temp", name + m->mothurGetpid(process) + ".temp", group + m->mothurGetpid(process) + ".temp"); //pass numSeqs to parent ofstream out; - string tempFile = toString(getpid()) + ".num.temp"; + string tempFile = m->mothurGetpid(process) + ".num.temp"; m->openOutputFile(tempFile, out); out << num << '\t' << outputNames.size() << endl; for (int i = 0; i < outputNames.size(); i++) { out << outputNames[i] << endl; }