19 lines
325 B
C
19 lines
325 B
C
#include <fcntl.h>
|
|
#include <stdio.h>
|
|
#include <sys/stat.h>
|
|
#include <unistd.h>
|
|
|
|
#define FIFO_NAME "example_fifo"
|
|
|
|
int main() {
|
|
char message[1024] = "OLOLO MESSAGE";
|
|
|
|
mkfifo(FIFO_NAME, 0666);
|
|
int fd = open(FIFO_NAME, O_WRONLY);
|
|
write(fd, message, sizeof(message));
|
|
close(fd);
|
|
// unlink(FIFO_NAME);
|
|
|
|
return 0;
|
|
}
|