X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=screenseqscommand.cpp;h=ff5f4650c73d3b71c6e76f7398603e711f788859;hb=aca78ed4a47dff8672ea8fd93cef0dfbaf0f7495;hp=bf702e13534f507576bee7c24bcf6462aacb7ca3;hpb=ac03f1f6c27b5bfdf2cfb6d45c3667c3e0281f51;p=mothur.git diff --git a/screenseqscommand.cpp b/screenseqscommand.cpp index bf702e1..ff5f465 100644 --- a/screenseqscommand.cpp +++ b/screenseqscommand.cpp @@ -1433,7 +1433,7 @@ int ScreenSeqsCommand::createProcessesContigsSummary(vector& oLength, vecto //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 @@ -1443,7 +1443,7 @@ int ScreenSeqsCommand::createProcessesContigsSummary(vector& oLength, vecto //pass numSeqs to parent ofstream out; - string tempFile = contigsreport + toString(getpid()) + ".num.temp"; + string tempFile = contigsreport + m->mothurGetpid(process) + ".num.temp"; m->openOutputFile(tempFile, out); out << num << endl; @@ -1703,7 +1703,7 @@ int ScreenSeqsCommand::createProcessesAlignSummary(vector& sims, vector 0) { processIDS.push_back(pid); //create map from line number to pid so you can append files in correct order later @@ -1713,7 +1713,7 @@ int ScreenSeqsCommand::createProcessesAlignSummary(vector& sims, vectormothurGetpid(process) + ".num.temp"; m->openOutputFile(tempFile, out); out << num << endl; @@ -1986,7 +1986,7 @@ int ScreenSeqsCommand::createProcessesCreateSummary(vector& startPosition, //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 @@ -1996,7 +1996,7 @@ int ScreenSeqsCommand::createProcessesCreateSummary(vector& startPosition, //pass numSeqs to parent ofstream out; - string tempFile = fastafile + toString(getpid()) + ".num.temp"; + string tempFile = fastafile + m->mothurGetpid(process) + ".num.temp"; m->openOutputFile(tempFile, out); out << num << endl; @@ -2526,17 +2526,17 @@ int ScreenSeqsCommand::createProcesses(string goodFileName, string badAccnos, st //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], goodFileName + toString(getpid()) + ".temp", badAccnos + toString(getpid()) + ".temp", filename, badSeqNames); + num = driver(lines[process], goodFileName + m->mothurGetpid(process) + ".temp", badAccnos + m->mothurGetpid(process) + ".temp", filename, badSeqNames); //pass numSeqs to parent ofstream out; - string tempFile = filename + toString(getpid()) + ".num.temp"; + string tempFile = filename + m->mothurGetpid(process) + ".num.temp"; m->openOutputFile(tempFile, out); out << num << endl; out.close();