Guest User

Untitled

a guest
Jan 16th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. mkfifo()
  2. while (true){
  3. open()
  4. select(...NULL)
  5. while (select... timeval(0)) {
  6. read()
  7. }
  8. close()
  9. }
  10.  
  11. int fd;
  12. char * myfifo = "/tmp/saveterm.fifo";
  13. char *msg = "MESSAGE";
  14. fd = open(myfifo, O_WRONLY);
  15. write(fd, msg, strlen(msg));
  16. close(fd);
Add Comment
Please, Sign In to add comment