hdd_menu: my_popen() needs waitpid to avoid zombies

This commit is contained in:
Stefan Seyfried
2015-02-08 00:55:44 +01:00
parent 0fcad4ddc5
commit 67bd1738a6

View File

@@ -37,6 +37,7 @@
#include <sys/stat.h>
#include <sys/swap.h>
#include <sys/vfs.h>
#include <sys/wait.h>
#include <dirent.h>
#include <dlfcn.h>
#include <sys/mount.h>
@@ -197,6 +198,7 @@ void CHDDMenuHandler::getBlkIds()
hdd_list.push_back(hdd);
}
fclose(f);
waitpid(pid, NULL, 0); /* beware of the zombie apocalypse! */
}
std::string CHDDMenuHandler::getDefaultPart(std::string dev)