- int result = system(command.str().c_str());
- if(result == -1)
- cLog.msg(Log::PRIO_ERROR) << "Execution of ifconfig failed" << AnytunErrno(errno);
- else {
- if(WIFEXITED(result))
- cLog.msg(Log::PRIO_NOTICE) << "ifconfig returned " << WEXITSTATUS(result);
- else if(WIFSIGNALED(result))
- cLog.msg(Log::PRIO_NOTICE) << "ifconfig terminated after signal " << WTERMSIG(result);
- else
- cLog.msg(Log::PRIO_ERROR) << "Execution of ifconfig: unkown error";