EmbLogic's Blog

SEVER SINGLE CLIENT FIFO AND PIPES WITH USE THE SHELL SCRIPT

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;     selected revisions: 1
description:
In file include a all header files realted this project.
—————————-
revision 1.1
date: 2016/02/04 11:32:41;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: request.h,v
Working file: request.h
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;     selected revisions: 3
description:
In file delacare a structure name is struct opreations and decalre a in member variable .
—————————-
revision 1.3
date: 2016/02/04 20:20:28;  author: root;  state: Exp;  lines: +0 -1
In file decalre result varable.
—————————-
revision 1.2
date: 2016/02/04 20:19:24;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
—————————-
revision 1.1
date: 2016/02/04 11:33:11;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: processing_client.c,v
Working file: processing_client.c
head: 1.8
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 8;     selected revisions: 8
description:
In file a getv the all structure data read the all structure using pipe and then found the result give the sever call to to the write.
—————————-
revision 1.8
date: 2016/02/07 11:01:05;  author: root;  state: Exp;  lines: +2 -0
In file removes the all sleeps.
—————————-
revision 1.7
date: 2016/02/04 19:16:31;  author: root;  state: Exp;  lines: +1 -1
In file display a operator.
—————————-
revision 1.6
date: 2016/02/04 19:14:40;  author: root;  state: Exp;  lines: +1 -1
In file some changing.
—————————-
revision 1.5
date: 2016/02/04 19:12:48;  author: root;  state: Exp;  lines: +4 -1
In file get a display structure in member variable.
—————————-
revision 1.4
date: 2016/02/04 19:07:15;  author: root;  state: Exp;  lines: +1 -0
In file calling sleep in 2 sec.
—————————-
revision 1.3
date: 2016/02/04 19:05:20;  author: root;  state: Exp;  lines: +1 -1
In file now write a result.
—————————-
revision 1.2
date: 2016/02/04 18:50:16;  author: root;  state: Exp;  lines: +1 -0
In file wfd,rfd and result are variables declare.
—————————-
revision 1.1
date: 2016/02/04 13:33:06;  author: root;  state: Exp;
Initial revision
=============================================================================
RCS file: request_client.c,v
Working file: request_client.c
head: 1.8
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 8;     selected revisions: 8
description:
In file declare a struct operations type a variable and all sturcture members in values all assign .
then call to the open and file open the all structure write a in fifo then call to the sleep in 5 sec.
—————————-
revision 1.8
date: 2016/02/07 11:01:44;  author: root;  state: Exp;  lines: +1 -1
In file check the this file write the data or not.
—————————-
revision 1.7
date: 2016/02/04 20:20:54;  author: root;  state: Exp;  lines: +1 -1
In file declare a result varibale and display the result .
—————————-
revision 1.6
date: 2016/02/04 20:19:26;  author: root;  state: Exp;  lines: +7 -9
*** empty log message ***
—————————-
revision 1.5
date: 2016/02/04 20:02:32;  author: root;  state: Exp;  lines: +20 -2
In file get a result of the server and display the result and add a if else condition in a file.
—————————-
revision 1.4
date: 2016/02/04 12:05:34;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.3
date: 2016/02/04 11:49:47;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.2
date: 2016/02/04 11:48:32;  author: root;  state: Exp;  lines: +14 -1
In file add a some checking condtions.
—————————-
revision 1.1
date: 2016/02/04 11:34:07;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: server.c,v
Working file: server.c
head: 1.11
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 11;    selected revisions: 11
description:
In file a first one declare a struct operations type a variable then calling to the system call is access and in condtions the fifo file in already avialable or not check the access then if not available the fifo file then call to mkfifo the n create fifo file and then call the open if open file is successfully then call to the read and read the structure in a fifo then all the structure is display in which some condions.
—————————-
revision 1.11
date: 2016/02/07 11:02:37;  author: root;  state: Exp;  lines: +1 -3
In file removes the all sleep.
/.
—————————-
revision 1.10
date: 2016/02/04 20:05:33;  author: root;  state: Exp;  lines: +15 -0
In file get a result to proceesing client and then in sleep 3 sec then give the result of the request client .
—————————-
revision 1.9
date: 2016/02/04 19:16:56;  author: root;  state: Exp;  lines: +1 -1
In file read a result .
—————————-
revision 1.8
date: 2016/02/04 18:55:15;  author: root;  state: Exp;  lines: +3 -3
In file check the working .
—————————-
revision 1.7
date: 2016/02/04 18:51:20;  author: root;  state: Exp;  lines: +2 -0
In file get result to processing client and display a result in file.
—————————-
revision 1.6
date: 2016/02/04 13:34:28;  author: root;  state: Exp;  lines: +25 -5
In file call a first call to the pipe and create a pipe then call to fork and then add a switch statements then execl call and and write a data give the all structure to processing client and then get a result of the processing client .
—————————-
revision 1.5
date: 2016/02/04 12:05:36;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.4
date: 2016/02/04 11:53:18;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.3
date: 2016/02/04 11:52:22;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.2
date: 2016/02/04 11:43:54;  author: root;  state: Exp;  lines: +2 -0
*** empty log message ***
—————————-
revision 1.1
date: 2016/02/04 11:36:18;  author: root;  state: Exp;
Initial revision
=============================================================================
SHELL SCRIPT

#! /bin/bash

delete()
{
rm -rf  server
rm -rf  request_client
}

edit()
{
read -p “do you want a edit further (y or n)” answer

if [ 'y' = $answer ]
then

for file in $(ls *.h,v)
do
co -l $file
done

for file in $(ls *.c,v)
do
co -l $file
done
delete
exit 0
fi
}

execute()
{
read -p “do you want a execute script(y or n)” answer

if [ 'y' = $answer ]
then
if (gcc -o server server.c)
then
echo “compailation successfully”
else
echo “compailation is failed”
edit
fi

if (gcc -o request_client request_client.c)
then
echo “compailation successfully”
else
echo “compailation is failed”
edit
fi
if (gcc -o processing_client processing_client.c)
then
echo “compailation successfully”
else
echo “compailation is failed”
edit
fi

else
edit
fi
./server & ./request_client
}

logfile()
{
chmod +x rlog.sh
./rlog.sh
edit
}

for file in $(ls *.h)
do
ci $file
done

for file in $(ls *.c)
do
ci $file
done

for file in $(ls *.h,v)
do
co $file
done

for file in $(ls *.c,v)
do
co $file
done
execute
read
logfile

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>