BUG: use pclose not fclose
This commit is contained in:
parent
17b02b6530
commit
e51844f83d
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue