//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
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;
//print out labels
ofstream outLabels;
- filename = toString(getpid()) + ".temp.labels";
+ filename = m->mothurGetpid(process) + ".temp.labels";
m->openOutputFile(filename, outLabels);
outLabels << cutoff << endl;