wait before exit
This commit is contained in:
parent
678fef9358
commit
80bacaf775
8
macrod.c
8
macrod.c
@ -14,6 +14,8 @@
|
|||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
/* Signaling */
|
/* Signaling */
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
/* Process wait */
|
||||||
|
#include <sys/wait.h>
|
||||||
|
|
||||||
#define test_bit(yalv, abs_b) ((((char *)abs_b)[yalv/8] & (1<<yalv%8)) > 0)
|
#define test_bit(yalv, abs_b) ((((char *)abs_b)[yalv/8] & (1<<yalv%8)) > 0)
|
||||||
|
|
||||||
@ -31,8 +33,6 @@
|
|||||||
#define OS unix
|
#define OS unix
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// TODO: add children linked list structure and methods
|
|
||||||
|
|
||||||
struct pressed_buffer {
|
struct pressed_buffer {
|
||||||
unsigned short *buf;
|
unsigned short *buf;
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
@ -206,8 +206,8 @@ int main (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: kill all running children before exiting
|
wait(NULL);
|
||||||
free(pb.buf);
|
free(pb.buf);
|
||||||
if (!term)
|
if (!term)
|
||||||
fputs("An error occured\n", stderr);
|
fputs("An error occured\n", stderr);
|
||||||
|
Loading…
Reference in New Issue
Block a user