]> git.donarmstrong.com Git - mothur.git/blobdiff - pairwiseseqscommand.cpp
update .gitignore
[mothur.git] / pairwiseseqscommand.cpp
index f874e9a869d269546c04ce8fd9648786dcc4bab1..3a43123a6a8b3612e0e8abf8a275f54a10473f94 100644 (file)
@@ -522,14 +522,14 @@ void PairwiseSeqsCommand::createProcesses(string filename) {
                
                //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); 
                                process++;
                        }else if (pid == 0){
-                               if (output != "square") {  driver(lines[process].start, lines[process].end, filename + toString(getpid()) + ".temp", cutoff); }
-                               else { driver(lines[process].start, lines[process].end, filename + toString(getpid()) + ".temp", "square"); }
+                               if (output != "square") {  driver(lines[process].start, lines[process].end, filename + m->mothurGetpid(process) + ".temp", cutoff); }
+                               else { driver(lines[process].start, lines[process].end, filename + m->mothurGetpid(process) + ".temp", "square"); }
                                exit(0);
                        }else { 
                                m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine();