changed the exit procedure so destructors can be called

stable
Penguin 3 years ago
parent b7b5ccd428
commit 728640188a

@ -13,10 +13,12 @@
int x = 0; int x = 0;
int y = 0; int y = 0;
bool b_quit = false;
void sigint_handler(int param) void sigint_handler(int param)
{ {
b_quit = true;
std::cout << "Exiting..." << std::endl; std::cout << "Exiting..." << std::endl;
exit(1);
} }
int main() int main()
@ -30,7 +32,7 @@ int main()
zmq::message_t msg_recv; zmq::message_t msg_recv;
zmq::message_t msg_send; zmq::message_t msg_send;
for (;;) while (!b_quit)
{ {
int32_t x = 0; int32_t x = 0;
int32_t y = 0; int32_t y = 0;

Loading…
Cancel
Save