From 80bacaf7756c66730cdf54ebb0e9de6ee535b5be Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Wed, 22 Apr 2020 17:09:10 +0200 Subject: [PATCH] wait before exit --- macrod.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/macrod.c b/macrod.c index 6a1144a..9322ea8 100644 --- a/macrod.c +++ b/macrod.c @@ -14,6 +14,8 @@ #include /* Signaling */ #include +/* Process wait */ +#include #define test_bit(yalv, abs_b) ((((char *)abs_b)[yalv/8] & (1< 0) @@ -31,8 +33,6 @@ #define OS unix #endif -// TODO: add children linked list structure and methods - struct pressed_buffer { unsigned short *buf; unsigned int size; @@ -206,8 +206,8 @@ int main (void) } } - - // TODO: kill all running children before exiting + + wait(NULL); free(pb.buf); if (!term) fputs("An error occured\n", stderr);