18 lines
334 B
C
18 lines
334 B
C
#include <fcntl.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
|
|
int main() {
|
|
int fd = open("/dev/wendy_in", O_WRONLY);
|
|
if (fd < 0) {
|
|
printf("Error open pipe");
|
|
return 1;
|
|
}
|
|
|
|
const char *msg = "Hello from the other side!\n";
|
|
write(fd, msg, strlen(msg));
|
|
|
|
close(fd);
|
|
return 0;
|
|
} |