]> git.donarmstrong.com Git - mothur.git/blobdiff - shhhseqscommand.cpp
pre.cluster unable to spawn necessary processes adjustment.
[mothur.git] / shhhseqscommand.cpp
index 0cc6eb4d24d8a963b87ae58012f341d6e0c47e79..f6fd90da276951724132140828d27c9de3a0d47a 100644 (file)
@@ -392,17 +392,17 @@ vector<string> ShhhSeqsCommand::createProcessesGroups(SequenceParser& parser, 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){
-                               mapfileNames = driverGroups(parser, newFName + toString(getpid()) + ".temp", newNName + toString(getpid()) + ".temp", newMName, lines[process].start, lines[process].end, groups);
+                               mapfileNames = driverGroups(parser, newFName + m->mothurGetpid(process) + ".temp", newNName + m->mothurGetpid(process) + ".temp", newMName, lines[process].start, lines[process].end, groups);
                                
                                //pass filenames to parent
                                ofstream out;
-                               string tempFile = newMName + toString(getpid()) + ".temp";
+                               string tempFile = newMName + m->mothurGetpid(process) + ".temp";
                                m->openOutputFile(tempFile, out);
                                out << mapfileNames.size() << endl;
                                for (int i = 0; i < mapfileNames.size(); i++) {