pipe: fix last remaining CPU thrasher

This commit is contained in:
itsmattkc committed 2025-12-30 02:56:00 -08:00
1 parent 590a163ef2
commit c30d889f0c
1 file changed
+4 -1
+4 -1
View File
@@ -208,7 +208,10 @@ void *read_stdin(void *arg)
}
} else if (sel < 0) {
perror("select()");
}
} else if (sel == 0) {
// Don't thrash while waiting for input
sleep(1);
}
pthread_mutex_lock(&main_loop_mutex);
}
pthread_mutex_unlock(&main_loop_mutex);