]> git.donarmstrong.com Git - mothur.git/blobdiff - unweighted.cpp
changed int to pid_t type in fork(). roughed in get.mimarkscommand.
[mothur.git] / unweighted.cpp
index 8fbd9d2fd64a90504e083f62418a54c40e8e26e1..3f4d205a82413c393a8a811ad9f772f1138e3b46 100644 (file)
@@ -85,7 +85,7 @@ EstOutput Unweighted::createProcesses(Tree* t, vector< vector<string> > namesOfG
                
                //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
@@ -100,7 +100,7 @@ EstOutput Unweighted::createProcesses(Tree* t, vector< vector<string> > namesOfG
                                
                                //pass numSeqs to parent
                                ofstream out;
-                               string tempFile = outputDir + toString(getpid()) + ".unweighted.results.temp";
+                               string tempFile = outputDir + m->mothurGetpid(process) + ".unweighted.results.temp";
                                m->openOutputFile(tempFile, out);
                                out << myresults.size() << endl;
                                for (int i = 0; i < myresults.size(); i++) {  out << myresults[i] << '\t';  } out << endl;
@@ -347,7 +347,7 @@ EstOutput Unweighted::createProcesses(Tree* t, vector< vector<string> > namesOfG
 
                //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
@@ -360,7 +360,7 @@ EstOutput Unweighted::createProcesses(Tree* t, vector< vector<string> > namesOfG
                                
                                //pass numSeqs to parent
                                ofstream out;
-                               string tempFile = outputDir + toString(getpid()) + ".unweighted.results.temp";
+                               string tempFile = outputDir + m->mothurGetpid(process) + ".unweighted.results.temp";
                                m->openOutputFile(tempFile, out);
                                out << myresults.size() << endl;
                                for (int i = 0; i < myresults.size(); i++) {  out << myresults[i] << '\t';  } out << endl;