only process running program when execsnoop thread started

This commit is contained in:
springzfx
2020-05-30 15:54:58 +08:00
parent b7ea8e441b
commit d1bf9620bf

View File

@@ -235,6 +235,7 @@ class cgproxyd {
future_status fstatus = status_f.wait_for(chrono::seconds(THREAD_TIMEOUT));
if (fstatus == std::future_status::ready) {
info("execsnoop thread started");
processRunningProgram();
} else {
error("execsnoop thread timeout, maybe failed");
}
@@ -291,7 +292,6 @@ public:
config.loadFromFile(DEFAULT_CONFIG_FILE);
applyConfig();
processRunningProgram();
if (enable_socketserver) startSocketListeningThread();
if (enable_execsnoop) startExecsnoopThread();