Various Ubuntu changes.

This commit is contained in:
Robin Davies
2021-09-08 13:15:49 -04:00
parent eb0dc52322
commit 210e496ffd
12 changed files with 130 additions and 105 deletions
+5 -4
View File
@@ -63,7 +63,7 @@ static std::filesystem::path findOnSystemPath(const std::string &command)
throw PiPedalException(s.str());
}
void pipedal::SilentSysExec(const char *szCommand)
int pipedal::silentSysExec(const char *szCommand)
{
std::stringstream s;
s << szCommand << " 2>&1";
@@ -76,10 +76,11 @@ void pipedal::SilentSysExec(const char *szCommand)
{
fgets(buffer, sizeof(buffer), output);
}
pclose(output);
return pclose(output);
}
return -1;
}
int pipedal::SysExec(const char *szCommand)
int pipedal::sysExec(const char *szCommand)
{
char *args = strdup(szCommand);
int argc;
@@ -135,7 +136,7 @@ int pipedal::SysExec(const char *szCommand)
}
std::string pipedal::GetSelfExePath()
std::string pipedal::getSelfExePath()
{
char result[PATH_MAX+1];
ssize_t count = readlink("/proc/self/exe", result, PATH_MAX);