X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=chopseqscommand.cpp;h=8027224a02409f73f31c0c36c72ea13c13115af5;hb=aca78ed4a47dff8672ea8fd93cef0dfbaf0f7495;hp=96d7ae641b8b956694fe5ad12b9671c0279b302c;hpb=79ca496859f48f1c38803c0f7c603faac348fe4c;p=mothur.git diff --git a/chopseqscommand.cpp b/chopseqscommand.cpp index 96d7ae6..8027224 100644 --- a/chopseqscommand.cpp +++ b/chopseqscommand.cpp @@ -372,17 +372,17 @@ bool ChopSeqsCommand::createProcesses(vector lines, string filename, s //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){ - wroteAccnos = driver(lines[process], filename, outFasta + toString(getpid()) + ".temp", outAccnos + toString(getpid()) + ".temp"); + wroteAccnos = driver(lines[process], filename, outFasta + m->mothurGetpid(process) + ".temp", outAccnos + m->mothurGetpid(process) + ".temp"); //pass numSeqs to parent ofstream out; - string tempFile = fastafile + toString(getpid()) + ".bool.temp"; + string tempFile = fastafile + m->mothurGetpid(process) + ".bool.temp"; m->openOutputFile(tempFile, out); out << wroteAccnos << endl; out.close();