]> git.donarmstrong.com Git - mothur.git/blobdiff - chopseqscommand.cpp
working on sra and get.mimarkspackage commands. added file parameter to cluster...
[mothur.git] / chopseqscommand.cpp
index 96d7ae641b8b956694fe5ad12b9671c0279b302c..8027224a02409f73f31c0c36c72ea13c13115af5 100644 (file)
@@ -372,17 +372,17 @@ bool ChopSeqsCommand::createProcesses(vector<linePair> 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();