From 41db424837ed25608f3c882b2948e37ab7b45852 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Tue, 19 Sep 2017 16:32:15 +0200 Subject: [PATCH] got rid of usleep, changed to pause() --- slsReceiverSoftware/src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/slsReceiverSoftware/src/main.cpp b/slsReceiverSoftware/src/main.cpp index 5fb967f20..19c98f58d 100644 --- a/slsReceiverSoftware/src/main.cpp +++ b/slsReceiverSoftware/src/main.cpp @@ -14,6 +14,7 @@ #include //wait #include //wait +#include //usleep #include using namespace std; @@ -78,7 +79,7 @@ int main(int argc, char *argv[]) { asa.sa_handler=SIG_IGN; // handler function sigemptyset(&asa.sa_mask); // dont block additional signals during invocation of handler if (sigaction(SIGPIPE, &asa, NULL) == -1) { - bprintf(RED, "Could not set handler function for SIGCHILD\n"); + bprintf(RED, "Could not set handler function for SIGPIPE\n"); } @@ -142,7 +143,7 @@ int main(int argc, char *argv[]) { FILE_LOG(logINFO) << "Ready ... "; bprintf(GRAY, "\n[ Press \'Ctrl+c\' to exit ]\n"); while(keeprunning) - usleep(5 * 1000 * 1000); + pause(); delete receiver; bprintf(BLUE,"Exiting [ Tid: %ld ]\n", (long)syscall(SYS_gettid));