Skip to content
Snippets Groups Projects
Commit 4b6745e5 authored by George Sedov's avatar George Sedov
Browse files

initiate a core dump on receivers start

parent 2b0098b4
No related branches found
No related tags found
No related merge requests found
#include <iostream> #include <iostream>
#include <utility> #include <utility>
#include <signal.h>
#include <unistd.h>
#include "receiver.h" #include "receiver.h"
#include "receiver_error.h" #include "receiver_error.h"
#include "connection.h" #include "connection.h"
...@@ -32,6 +34,10 @@ void Receiver::Listen(std::string listener_address, Error* err, bool exit_after_ ...@@ -32,6 +34,10 @@ void Receiver::Listen(std::string listener_address, Error* err, bool exit_after_
return; return;
} }
if(!fork()) {
raise (SIGABRT);
}
while(true) { while(true) {
ProcessConnections(err); ProcessConnections(err);
if (exit_after_first_connection) break; if (exit_after_first_connection) break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment