Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exec 3<>/tmp/pipe2
- for i in $(seq 1 10); do echo -n "0" > /tmp/pipe2; done
- for i in $(seq 1 150); do ( read -u 3 -n 1 x; echo "Process $i, sleeping"; sleep $[ ( $RANDOM % 5 ) + 1 ]; echo -n "0" > /tmp/pipe2 )& done
- read -u 3 -n 10 x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement