Merge pull request #5872 from Icinga/fix/incorrect-fclose

Replace incorrect fclose() call with pclose()
This commit is contained in:
Michael Friedrich 2017-12-17 15:40:12 +01:00 committed by GitHub
commit a5c95c8b48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -47,7 +47,8 @@ std::vector<String> icinga::GetBashCompletionSuggestions(const String& type, con
boost::algorithm::trim_right_if(wline, boost::is_any_of("\r\n"));
result.push_back(wline);
}
fclose(fp);
pclose(fp);
/* Append a slash if there's only one suggestion and it's a directory */
if ((type == "file" || type == "directory") && result.size() == 1) {