I want to Implement a Synchronisation primitive such as a semaphore
that will ensure mutual exclusion, prevent deadlock when concurrent
request are made from the clients. C scripts in the UNIX environment
in the below script
I ma just trying to stop two clients accessing the same server file at
the same time
echo " select any option to execute:"
echo " c or C: To connect Client to Server"
echo " r or R: To make a read request"
echo " s or S: I want to sort data"
echo " g or G: Look for a certain word in a file"
echo " e or E: quit"
echo -n "Enter your option and press <Enter>:"
set selection = `head -1`
echo -n "enter server name"
set servername = `head -1`
echo -n "enter server file to read content"
set serverfile = `head -1`
echo -n "enter server file to sort"
set serverfile1 = `head -1`