BUG: use pclose not fclose

This commit is contained in:
Bill Hoffman 2001-06-18 17:26:30 -04:00
parent 17b02b6530
commit e51844f83d
1 changed files with 2 additions and 2 deletions

View File

@ -751,7 +751,7 @@ bool cmSystemTools::RunCommand(const char* command,
cmSystemTools::RemoveFile(tempFile.c_str()); cmSystemTools::RemoveFile(tempFile.c_str());
return true; return true;
#else #else
std::cout << "runing " << command << std::endl; std::cout << "running " << command << std::endl;
FILE* cpipe = popen(command, "r"); FILE* cpipe = popen(command, "r");
if(!cpipe) if(!cpipe)
{ {
@ -764,7 +764,7 @@ bool cmSystemTools::RunCommand(const char* command,
output += buffer; output += buffer;
fgets(buffer, BUFFER_SIZE, cpipe); fgets(buffer, BUFFER_SIZE, cpipe);
} }
fclose(cpipe); pclose(cpipe);
return true; return true;
#endif #endif
} }