]> git.donarmstrong.com Git - mothur.git/blobdiff - primerdesigncommand.cpp
working of get.mimarkspackage and sra command
[mothur.git] / primerdesigncommand.cpp
index bd68e2c97721b4451f7fe51a559a22a50710885f..768aa69e529defa11e05922c4219c521833c3f9a 100644 (file)
@@ -560,18 +560,18 @@ set<int> PrimerDesignCommand::createProcesses(string newSummaryFile, vector<doub
                
                //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){
                 //clear old file because we append in driver
-                m->mothurRemove(newSummaryFile + toString(getpid()) + ".temp");
+                m->mothurRemove(newSummaryFile + m->mothurGetpid(process) + ".temp");
                 
-                               otusToRemove = driver(newSummaryFile + toString(getpid()) + ".temp", minTms, maxTms, primers, conSeqs, lines[process].start, lines[process].end, numBinsProcessed, binIndex);
+                               otusToRemove = driver(newSummaryFile + m->mothurGetpid(process) + ".temp", minTms, maxTms, primers, conSeqs, lines[process].start, lines[process].end, numBinsProcessed, binIndex);
                 
-                string tempFile = toString(getpid()) + ".otus2Remove.temp";
+                string tempFile = m->mothurGetpid(process) + ".otus2Remove.temp";
                 ofstream outTemp;
                 m->openOutputFile(tempFile, outTemp);
                 
@@ -819,7 +819,7 @@ vector<Sequence> PrimerDesignCommand::createProcessesConSeqs(map<string, int>& n
 
                //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
@@ -827,7 +827,7 @@ vector<Sequence> PrimerDesignCommand::createProcessesConSeqs(map<string, int>& n
                        }else if (pid == 0){
                                counts = driverGetCounts(nameMap, fastaCount, otuCounts, lines[process].start, lines[process].end);
                 
-                string tempFile = toString(getpid()) + ".cons_counts.temp";
+                string tempFile = m->mothurGetpid(process) + ".cons_counts.temp";
                 ofstream outTemp;
                 m->openOutputFile(tempFile, outTemp);