diff --git a/main.cpp b/main.cpp index cd5b0d318aef9b74daad14c906a0ea71b8bf1e9d..a6a95d849ded81a64db840de304b8eadf7767fb5 100644 --- a/main.cpp +++ b/main.cpp @@ -167,10 +167,14 @@ int main(int argc, char *argv[]) while(true) { server.serve_one_request(); - log_on_demand(LOG_DEBUG, comm_link.recv_data().c_str()); - comm_link.send_data("go to hell!"); - log_on_demand(LOG_DEBUG, "Raising SIGTERM"); - raise(SIGTERM); + if(comm_link.recv_data() == "kill") + { + comm_link.send_data("go to hell!"); + log_on_demand(LOG_DEBUG, "Raising SIGTERM"); + raise(SIGTERM); + } + else + comm_link.send_data("nothing has happened"); } // ---------------- SERVE END -------------------------