diff options
author | Christian Pointner <equinox@anytun.org> | 2009-01-20 15:04:27 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2009-01-20 15:04:27 +0000 |
commit | 025ca82002b81796f34752c4c590fde9c6729df0 (patch) | |
tree | 2bcaa1fe3fff746dc99857336210d828aea18bea /src/sysexec.hpp | |
parent | fixed linux and bsd tunDevice (filedescriptor gets now closed in case of an e... (diff) |
further cleanup for system execution
Diffstat (limited to 'src/sysexec.hpp')
-rw-r--r-- | src/sysexec.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sysexec.hpp b/src/sysexec.hpp index 2883102..0730cea 100644 --- a/src/sysexec.hpp +++ b/src/sysexec.hpp @@ -60,8 +60,10 @@ int execScript(std::string const& script, std::string const& ifname, std::string waitpid(pid, &status, 0); if(WIFEXITED(status)) cLog.msg(Log::PRIO_NOTICE) << "script '" << script << "' returned " << WEXITSTATUS(status); - if(WIFSIGNALED(status)) + else if(WIFSIGNALED(status)) cLog.msg(Log::PRIO_NOTICE) << "script '" << script << "' terminated after signal " << WTERMSIG(status); + else + cLog.msg(Log::PRIO_ERR) << "executing script: unkown error"; return status; } |