]> git.donarmstrong.com Git - mothur.git/blobdiff - classifyseqscommand.cpp
changed int to pid_t type in fork(). roughed in get.mimarkscommand.
[mothur.git] / classifyseqscommand.cpp
index 30bfd9e486c151572940ce461f14a05ed46e5721..2bbefcbbf968f0cf5c2b1188000bf3a9cfd90400 100644 (file)
@@ -974,17 +974,17 @@ int ClassifySeqsCommand::createProcesses(string taxFileName, string tempTaxFile,
                
                //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){
-                               num = driver(lines[process], taxFileName + toString(getpid()) + ".temp", tempTaxFile + toString(getpid()) + ".temp", accnos + toString(getpid()) + ".temp", filename);
+                               num = driver(lines[process], taxFileName + m->mothurGetpid(process) + ".temp", tempTaxFile + m->mothurGetpid(process) + ".temp", accnos + m->mothurGetpid(process) + ".temp", filename);
 
                                //pass numSeqs to parent
                                ofstream out;
-                               string tempFile = filename + toString(getpid()) + ".num.temp";
+                               string tempFile = filename + m->mothurGetpid(process) + ".num.temp";
                                m->openOutputFile(tempFile, out);
                                out << num << endl;
                                out.close();