Replace incorrect fclose() call with pclose()

This commit is contained in:
Gunnar Beutner 2017-12-15 22:24:08 +01:00
parent 9d5e5cd832
commit 5d96196f08
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) {