thesis/code/pipe_utils.c
2025-04-04 00:36:58 +02:00

13 lines
216 B
C

#define _GNU_SOURCE
#include <fcntl.h>
#include <unistd.h>
void
allocation_primitive(int fd[2])
{
pipe2(fd, O_NONBLOCK);
fcntl(fd[0], F_SETPIPE_SZ, 8192);
char buffer[0x100] = { 0 };
write(fd[1], buffer, 8);
}