diff --git a/usertable.cpp b/usertable.cpp index 11fd04b..fd26756 100644 --- a/usertable.cpp +++ b/usertable.cpp @@ -471,11 +471,9 @@ void UserTable::OnEvent(InotifyEvent& rEvt) // for system table if (m_fSysTable) { - if (system(cmd.c_str()) != 0) // exec failed - { - syslog(LOG_ERR, "cannot exec process: %s", strerror(errno)); - _exit(1); - } + execl("/bin/sh", "sh", "-c", cmd.c_str(), (char *) NULL); + syslog(LOG_ERR, "cannot exec process: %s", strerror(errno)); + _exit(1); } else { // for user table