Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mkfifo()
- while (true){
- open()
- select(...NULL)
- while (select... timeval(0)) {
- read()
- }
- close()
- }
- int fd;
- char * myfifo = "/tmp/saveterm.fifo";
- char *msg = "MESSAGE";
- fd = open(myfifo, O_WRONLY);
- write(fd, msg, strlen(msg));
- close(fd);
Add Comment
Please, Sign In to add comment