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

View Raw

More Information

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

#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");
	}
}