diff options
author | epoch <epoch@hacking.allowed.org> | 2017-12-19 03:55:35 -0600 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2017-12-19 03:55:35 -0600 |
commit | 4a080b8f4f061f1c7cbf0d6d996d535dc3f2db35 (patch) | |
tree | 031d006c0fdbf14697c49f69591a343d39791596 /tictactoe/listen.sh | |
parent | ac2f7a61cd4060a617ae012ead020755c0ef4902 (diff) | |
download | hackvr-4a080b8f4f061f1c7cbf0d6d996d535dc3f2db35.tar.gz hackvr-4a080b8f4f061f1c7cbf0d6d996d535dc3f2db35.zip |
make scripts create their own named pipes and attempt to rm them
Diffstat (limited to 'tictactoe/listen.sh')
-rwxr-xr-x | tictactoe/listen.sh | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tictactoe/listen.sh b/tictactoe/listen.sh index 4379a3d..0318cd2 100755 --- a/tictactoe/listen.sh +++ b/tictactoe/listen.sh @@ -3,7 +3,17 @@ #mabe not. might be buggier. #cat board p1out | ncat -lp 1050 > p1in & #cat board p2out | ncat -lp 1051 > p2in & -cat board p1out | ncat -lp 1050 > p1in & -cat board p2out | ncat -lp 1051 > p1in & +echo listening in port 1050 for player 1 and 1051 for player 2 -cat p1in | ./game.sh | tee p1out p2out +mknod pin p +mknod p1out p +mknod p2out p + +cat board p1out | ncat -lp 1050 > pin & +cat board p2out | ncat -lp 1051 > pin & + +cat pin | ./game.sh | tee p1out p2out + +rm pin +rm p1out +rm p2out |