summaryrefslogtreecommitdiff
path: root/src/subscriber.c
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-07-18 13:00:38 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2023-07-18 13:00:38 +0200
commit7f87211b01bcc116eba8b01b73677ea87172e8d7 (patch)
treed92a66698ac50996b1842328cbc5846175dd1da7 /src/subscriber.c
parent55d9cd75679050b45f1b350decb95d05aac2a47e (diff)
Minor changes
Diffstat (limited to 'src/subscriber.c')
-rw-r--r--src/subscriber.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/subscriber.c b/src/subscriber.c
index 9902d92..08e5a25 100644
--- a/src/subscriber.c
+++ b/src/subscriber.c
@@ -3,7 +3,14 @@
#include <signal.h>
#include "utils.h"
+/// @brief Set to non-zero to stop the processes
unsigned char __stop=0;
+
+/**
+ * @brief Stop process properly on SIGINT
+ *
+ * @param signo
+ */
void sighandler(int signo){
if (signo == SIGINT){
printf("Stopping...\n");
@@ -83,7 +90,6 @@ int main (int argc, char *argv [])
// Write all the measurements:
if(line>4){
fwrite(token, strlen(token), 1, fptr);
- printf("%s\n",token);
fwrite("\n",1,1,fptr);
}