#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #define FIFO_PATH "/tmp/myfifo" int main() { int fd; char *message = "Hello from writer process!"; // Open the FIFO for writing fd = open(FIFO_PATH, O_WRONLY); if (fd == -1) { perror("open"); exit(EXIT_FAILURE); } // Write to the FIFO write(fd, message, strlen(message) + 1); // Close the FIFO close(fd); return 0; }