Guest User

Untitled

a guest
Dec 12th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. pipe='/tmp/mypipe'
  2. mkfifo "$pipe"
  3.  
  4. echo "$0 going to sleep..."
  5.  
  6. # Should block
  7. read < "$pipe"
  8.  
  9. echo "$0 continuing"
  10.  
  11. pipe='/tmp/mypipe'
  12.  
  13. mkfifo "$pipe"
  14.  
  15. echo "$0 waking other process"
  16.  
  17. # might block
  18. echo > "$pipe"
  19.  
  20. echo "$0 exiting"
Add Comment
Please, Sign In to add comment