Changed sleep time from 1 sec to 50 ms

This commit is contained in:
2020-12-15 19:59:20 +01:00
parent 93973c6e77
commit 7c2e3f2f9b

View File

@ -130,7 +130,9 @@ void terminate() {
signal(SIGTERM, SIG_IGN);
if (wait_num > 0) {
sleep(1);
// Wait another 50 ms to let child processes write to stdout/stderr
struct timespec ts = {.tv_sec = 0, .tv_nsec = 50000000};
nanosleep(&ts, &ts);
fprintf(stderr, "\nGoodbye\n");
} else {
fprintf(stderr, "Goodbye\n");