💾 Archived View for thrig.me › blog › 2023 › 09 › 28 › stuck.c captured on 2023-12-28 at 16:57:26.

View Raw

More Information

⬅️ Previous capture (2023-09-28)

-=-=-=-=-=-=-

#include <err.h>
#include <stdio.h>
#include <unistd.h>

int
main(void)
{
	char buf[1];
	int fds[2];
	if (pipe(fds) != 0) err(1, "pipe");
	while (1) {
		read(fds[0], buf, 1);
		fprintf(stderr, "not stuck\n");
	}
}