]> git.donarmstrong.com Git - mothur.git/blobdiff - preclustercommand.cpp
working of get.mimarkspackage and sra command
[mothur.git] / preclustercommand.cpp
index 05c8b7d42a1ba7de160449f02707097800357bea..def53255b1c124c2d40ae76120723f78f47a7bec 100644 (file)
@@ -383,16 +383,16 @@ int PreClusterCommand::createProcessesGroups(string newFName, string newNName, 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){
                 outputNames.clear();
-                               num = driverGroups(newFName + toString(getpid()) + ".temp", newNName + toString(getpid()) + ".temp", newMFile, lines[process].start, lines[process].end, groups);
+                               num = driverGroups(newFName + m->mothurGetpid(process) + ".temp", newNName + m->mothurGetpid(process) + ".temp", newMFile, lines[process].start, lines[process].end, groups);
                 
-                string tempFile = toString(getpid()) + ".outputNames.temp";
+                string tempFile = m->mothurGetpid(process) + ".outputNames.temp";
                 ofstream outTemp;
                 m->openOutputFile(tempFile, outTemp);