Obsolete
/
libipc-old
Archived
3
0
Fork 0

pingpong.sh: update to add version in the pipe names

more_to_read
Philippe PITTOLI 2016-09-17 14:49:10 +02:00
parent 3a95a6ecea
commit fceb09a592
1 changed files with 8 additions and 8 deletions

View File

@ -21,21 +21,21 @@ fi
for pid in `seq 1 ${NB}` for pid in `seq 1 ${NB}`
do do
# we make the application pipes # we make the application pipes
mkfifo ${REP}${pid}-1-in 2>/dev/null mkfifo ${REP}${pid}-1-1-in 2>/dev/null
mkfifo ${REP}${pid}-1-out 2>/dev/null mkfifo ${REP}${pid}-1-1-out 2>/dev/null
# pid index version # pid index version
echo "${pid} 1 5" > ${REP}${SERVICE} echo "${pid} 1 1" > ${REP}${SERVICE}
# the purpose is to send something in the pipe # the purpose is to send something in the pipe
cat /dev/urandom | base64 | head -n 1 > ${REP}${pid}-1-out cat /dev/urandom | base64 | head -n 1 > ${REP}${pid}-1-1-out
# echo "hello world" > ${REP}${pid}-1-out # echo "hello world" > ${REP}${pid}-1-out
# the the service will answer with our message # the the service will answer with our message
echo "pid : ${pid}" echo "pid : ${pid}"
cat ${REP}/${pid}-1-in cat ${REP}/${pid}-1-1-in
done done
echo "clean rep" echo "clean rep"
rm ${REP}/*-in rm ${REP}/*-in
rm ${REP}/*-out rm ${REP}/*-out