]> git.donarmstrong.com Git - mothur.git/blobdiff - clustersplitcommand.cpp
changed int to pid_t type in fork(). roughed in get.mimarkscommand.
[mothur.git] / clustersplitcommand.cpp
index 874eb6d7b535e9e400cca8f22593280ecd959b42..e61e10794caafa3e3cb8f5ffd45d847a7fd2bc8a 100644 (file)
@@ -971,7 +971,7 @@ vector<string>  ClusterSplitCommand::createProcesses(vector< map<string, string>
                
                //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
@@ -981,7 +981,7 @@ vector<string>  ClusterSplitCommand::createProcesses(vector< map<string, string>
                                vector<string> listFileNames = cluster(dividedNames[process], labels);
                                
                                //write out names to file
-                               string filename = toString(getpid()) + ".temp";
+                               string filename = m->mothurGetpid(process) + ".temp";
                                ofstream out;
                                m->openOutputFile(filename, out);
                                out << tag << endl;
@@ -990,7 +990,7 @@ vector<string>  ClusterSplitCommand::createProcesses(vector< map<string, string>
                                
                                //print out labels
                                ofstream outLabels;
-                               filename = toString(getpid()) + ".temp.labels";
+                               filename = m->mothurGetpid(process) + ".temp.labels";
                                m->openOutputFile(filename, outLabels);
                                
                                outLabels << cutoff << endl;