<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>EmbLogic &#187; Gurbhej Gill</title>
	<atom:link href="https://www.emblogic.com/blog/author/gurbhejgill1996/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>Single Client Server Communication Using Socket In Using UNIX_AF With Use The Shell Script</title>
		<link>https://www.emblogic.com/blog/03/single-client-server-communication-using-socket-in-using-unix_af-with-use-the-shell-script/</link>
		<comments>https://www.emblogic.com/blog/03/single-client-server-communication-using-socket-in-using-unix_af-with-use-the-shell-script/#comments</comments>
		<pubDate>Thu, 10 Mar 2016 00:58:46 +0000</pubDate>
		<dc:creator><![CDATA[Gurbhej Gill]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13327</guid>
		<description><![CDATA[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 all header files included this project related . &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- revision 1.1 date: 2016/02/28 &#8230; <a href="https://www.emblogic.com/blog/03/single-client-server-communication-using-socket-in-using-unix_af-with-use-the-shell-script/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>RCS file: header.h,v<br />
Working file: header.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;     selected revisions: 1<br />
description:<br />
In file all header files included this project related .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/02/28 12:03:13;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: request.h,v<br />
Working file: request.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;     selected revisions: 1<br />
description:<br />
In file structure declare named socket struct type in member varible are three all varibale char array type in<br />
all array size 10-10 bytes.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/02/28 12:29:12;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: request_client.c,v<br />
Working file: request_client.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;     selected revisions: 1<br />
description:<br />
In file include a two user defined header file names are header.h and request.h them declare struct socket s3 variable^then call a strcpy function call this help the strings store the in member char array in variable then predefined socke^[[un.h header file in declare a structure named is struct sockaddr_un and in two member varible first is sun_family and second is sun_path and set the value in sun_family in give the domain name is AF_UNIX and then second in give the path is socket socket name is which derectory you want to created give the full path before a struct sockaddr_un type decalre a object<br />
&gt;&gt; then give the assign path then call a socket and in give the argument first domain is AF_UNIX second is type is SOCK_STREAM then give the protocol is NULL because if u give the NULL then second agrument acording put the agrument is bydefsulkt bydefault and if second argument is SOCK_STREAM then put the protocol is TCP/IP then socket is created but unnamed then then call the connect and give the agrument socket fd and then type cast the sockaddr_un to sockaddr * because in seond argumet give the this data * then give then length socklen_t type then write the all structure data give the server in help help of the socket and if any condtions write return a 0 then report the write call .<br />
----------------------------<br />
revision 1.1<br />
date: 2016/02/28 12:30:06;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: server.c,v<br />
Working file: server.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;     selected revisions: 1<br />
description:<br />
In file include a two user defined header file names are header.h and request.h them declare struct socket s3 variablethen call a strcpy function call this help the strings store the in member char array in variable then predefined socun.h header file in declare a structure named is struct sockaddr_un and in two member varible first is sun_family and second is sun_path and set the value in sun_family in give the domain name is AF_UNIX and then second in give the path is socket socket name is which derectory you want to created give the full path before a struct sockaddr_un type decalre a object<br />
then give the assign path then call a socket and in give the argument first domain is AF_UNIX second is type is SOCK_STREAM then give the protocol is NULL because if u give the NULL then second agrument acording put the agrument is bydefsulkt bydefault and if second argument is SOCK_STREAM then put the protocol is TCP/IP then socket is created but unnamed then  call the bind in which give the argument in help of socket return fd on then bind is return succfully then call to return<br />
then call to listen in agrumnet socket fd and how many client want a connect to server this listen is make a queue then<br />
call to accept In give the arguement this make duplicate same unnamed socket and return the fd then<br />
read the client data help of the socket and then check the how many succesfully bytes read if any condtion is falied rreturn is 0 then report the write call then if data successfully read then display this .<br />
----------------------------<br />
revision 1.1<br />
date: 2016/02/28 12:04:47;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>SHELL SCRIPT</p>
<p>&nbsp;</p>
<p>#! /bin/bash</p>
<p>delete()<br />
{<br />
rm -rf request_client<br />
rm -rf server<br />
rm -rf socket<br />
}</p>
<p>edit()<br />
{<br />
read -p "do you want a edit further (y or n)" answer</p>
<p>if [ 'y' = $answer ]<br />
then</p>
<p>for file in $(ls *.h,v)<br />
do<br />
co -l $file<br />
done</p>
<p>for file in $(ls *.c,v)<br />
do<br />
co -l $file<br />
done<br />
delete<br />
exit 0<br />
fi<br />
}</p>
<p>execute()<br />
{<br />
read -p &#8220;do you want a compile a project&#8221; answer</p>
<p>if [ 'y' = $answer ]<br />
then<br />
if ( gcc -o server  server.c)<br />
then<br />
echo &#8220;compile is successfull&#8221;<br />
else<br />
echo &#8220;compile is failed&#8221;<br />
edit<br />
fi</p>
<p>if ( gcc -o request_client request_client.c )<br />
then<br />
echo &#8220;compile is sucessfull&#8221;<br />
else<br />
echo &#8220;compile is failed&#8221;<br />
edit<br />
fi</p>
<p>else<br />
edit<br />
fi<br />
read -p &#8220;do you want a execute this project&#8221; answer</p>
<p>if [ 'y' = $answer ]<br />
then<br />
./server &amp; ./request_client</p>
<p>else<br />
echo &#8220;execution is failed&#8221;<br />
edit<br />
fi</p>
<p>}</p>
<p>logfile()<br />
{<br />
read -p &#8220;do you want a run a logfile&#8221; answer</p>
<p>if [ 'y' = $answer ]<br />
then<br />
chmod +x rlog.sh<br />
./rlog.sh<br />
fi<br />
}</p>
<p>for file in $(ls *.h)<br />
do<br />
ci $file<br />
done</p>
<p>for file in $(ls *.c)<br />
do<br />
ci $file<br />
done</p>
<p>for file in $(ls *.h,v)<br />
do<br />
co $file<br />
done<br />
for file in $(ls *.c,v)<br />
do<br />
co $file<br />
done<br />
execute<br />
logfile<br />
edit</p>
<p>logfile creted in shell script</p>
<p>#! /bin/bash</p>
<p>read -p &#8220;do you want a delete old file&#8221; answer</p>
<p>if [ 'y' = $answer ]<br />
then<br />
if [ -f logfile ]<br />
then<br />
rm -rf logfile<br />
touch logfile<br />
else<br />
echo &#8220;logfile is not found&#8221;<br />
fi<br />
fi</p>
<p>read -p &#8220;do you want a update a logfile&#8221; answer</p>
<p>if [ 'y' = $answer ]<br />
then<br />
for file in $(ls *.h,v)<br />
do<br />
rlog $file &gt;&gt; logfile<br />
done</p>
<p>for file in $(ls *.c,v)<br />
do<br />
rlog $file &gt;&gt; logfile<br />
done<br />
fi</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/single-client-server-communication-using-socket-in-using-unix_af-with-use-the-shell-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Single Client  Server And Single Thread Communication Using FIFO With Use The Shell Script</title>
		<link>https://www.emblogic.com/blog/02/single-client-server-and-single-thread-communication-with-using-the-shell-script/</link>
		<comments>https://www.emblogic.com/blog/02/single-client-server-and-single-thread-communication-with-using-the-shell-script/#comments</comments>
		<pubDate>Thu, 25 Feb 2016 22:09:59 +0000</pubDate>
		<dc:creator><![CDATA[Gurbhej Gill]]></dc:creator>
				<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[Shell Scripts]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13307</guid>
		<description><![CDATA[RCS file: header.h,v Working file: header.h head: 1.15 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 15;    selected revisions: 15 description: In file all include header files related this project. &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- revision 1.15 date: 2016/02/25 06:18:43;  &#8230; <a href="https://www.emblogic.com/blog/02/single-client-server-and-single-thread-communication-with-using-the-shell-script/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>RCS file: header.h,v<br />
Working file: header.h<br />
head: 1.15<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 15;    selected revisions: 15<br />
description:<br />
In file all include header files related this project.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2016/02/25 06:18:43;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2016/02/25 06:15:12;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2016/02/24 09:13:23;  author: root;  state: Exp;  lines: +1 -0<br />
In file include a semaphore.h header files .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2016/02/24 08:44:38;  author: root;  state: Exp;  lines: +0 -1<br />
In file remove a prototype second thread hendler function<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/02/23 16:38:46;  author: root;  state: Exp;  lines: +1 -0<br />
In file decalre a prototypes another handler function this handler in server in handler function return type void.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/02/23 11:41:03;  author: root;  state: Exp;  lines: +2 -1<br />
In file declare a prototypes of signal handler is return type is chany void not a void .<br />
void *.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/02/23 11:39:06;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/02/23 10:30:18;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/02/23 10:28:18;  author: root;  state: Exp;  lines: +1 -0<br />
In file now include a signal.h header file before declare a prototype signal handler functions.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/02/23 10:18:53;  author: root;  state: Exp;  lines: +1 -0<br />
In file include a new a header file signal.h<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/02/21 08:40:55;  author: root;  state: Exp;  lines: +1 -1<br />
In file check how working<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/02/21 08:08:10;  author: root;  state: Exp;  lines: +1 -1<br />
In file decalre a prototypes in will agrument pass in thread is type void *<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/02/21 07:49:17;  author: root;  state: Exp;  lines: +2 -0<br />
In file decalre a prototypes of processing client thread .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/02/20 05:54:00;  author: root;  state: Exp;  lines: +3 -0<br />
In file include a header files.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/02/20 05:33:07;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: request.h,v<br />
Working file: request.h<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;     selected revisions: 2<br />
description:<br />
In file assgin a data in structure then open a fifo in write only mode then write the data .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/02/23 10:19:14;  author: root;  state: Exp;  lines: +1 -0<br />
In file in structure member decalre a pid variable in int type.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/02/20 05:34:10;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: processing_client.c,v<br />
Working file: processing_client.c<br />
head: 1.30<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 30;    selected revisions: 30<br />
description:<br />
In file this is processing client thread this call from the server in file return and pasing argument is void *<br />
then decalre a struct operations type a variable then open a fifo in read only mode then read the data all.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.30<br />
date: 2016/02/25 06:27:07;  author: root;  state: Exp;  lines: +2 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.18<br />
date: 2016/02/24 11:00:55;  author: root;  state: Exp;  lines: +11 -1<br />
In fioe        fd=open(&#8220;fifo&#8221;,O_RDONLY);</p>
<p>In file calling a sem_wait and sem_post and display this values.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.17<br />
date: 2016/02/24 09:59:46;  author: root;  state: Exp;  lines: +1 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16<br />
date: 2016/02/24 09:28:27;  author: root;  state: Exp;  lines: +2 -0<br />
In file this thread starting call to the sem_wait beacuse now this thread for read for the working and any another<br />
thread don&#8217;t interupted so then this thread complete the work then call to the sem_post beacuse this thread works are complted and out of critical section this thread .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2016/02/24 09:17:08;  author: root;  state: Exp;  lines: +1 -1<br />
In file removes a sum bugs.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2016/02/24 09:16:27;  author: root;  state: Exp;  lines: +0 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2016/02/24 09:15:13;  author: root;  state: Exp;  lines: +2 -2<br />
In file decalre a properly sem<br />
sem_t type sem2 variable .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2016/02/24 08:45:16;  author: root;  state: Exp;  lines: +5 -3<br />
In file fretch a semaphore a variable void * type then this variable type cast in sem_init type and before signals methmethod are falied in thread because thread to main thread don&#8217;t send a signals always because thread id we do not can find<br />
in main_thread so that reason is falied<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/02/23 16:44:20;  author: root;  state: Exp;  lines: +1 -0<br />
decalre a pthread_t type id variable<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/02/23 16:39:52;  author: root;  state: Exp;  lines: +4 -1<br />
In file frecth the value in thread id void * type then type cast of pthread_id data type then pthread_kill using the<br />
SIGINT signal send the the main thread .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/02/21 09:48:10;  author: root;  state: Exp;  lines: +1 -1<br />
In file some corrections in code.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/02/21 09:42:17;  author: root;  state: Exp;  lines: +7 -1<br />
In file a get a data then solve the result means two variable add and in store a result variable then open a fifo<br />
in write only mode then write the result.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/02/21 09:18:11;  author: root;  state: Exp;  lines: +3 -3<br />
In file remvoe the sleep in 3 second<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/02/21 08:41:18;  author: root;  state: Exp;  lines: +2 -2<br />
In file pass a argument in a void * variable<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/02/21 08:29:01;  author: root;  state: Exp;  lines: +3 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/02/21 08:15:14;  author: root;  state: Exp;  lines: +1 -1<br />
In file frecth a agrument is void * c<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/02/21 08:14:13;  author: root;  state: Exp;  lines: +2 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/02/21 08:08:58;  author: root;  state: Exp;  lines: +1 -1<br />
In file fretch the argument thread_id varable void *<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/02/21 07:40:25;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: request_client.c,v<br />
Working file: request_client.c<br />
head: 1.13<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 13;    selected revisions: 13<br />
description:<br />
In file assgin a data in structure then open a fifo in write only mode then write the data .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2016/02/23 11:42:19;  author: root;  state: Exp;  lines: +1 -1<br />
In file signal handler change a return type only void not a void *.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2016/02/23 11:39:07;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/02/23 10:23:23;  author: root;  state: Exp;  lines: +16 -4<br />
In file make a signal handler names functions in file top and in which file calling to that functions and then add a<br />
pause() and when SIGINT signal is genrate then calling to signal handler functions and sleep is removes in file .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/02/21 11:34:30;  author: root;  state: Exp;  lines: +1 -0<br />
In file check how working.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/02/21 11:24:56;  author: root;  state: Exp;  lines: +2 -1<br />
In file calling to sleep.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/02/21 11:23:55;  author: root;  state: Exp;  lines: +2 -2<br />
In file some removes a bugs .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/02/21 11:23:10;  author: root;  state: Exp;  lines: +2 -2<br />
In file decarle a result variable .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/02/21 11:09:51;  author: root;  state: Exp;  lines: +17 -0<br />
In file open a fifo in read only mode if fd is negative then call to open then read a result if read is failed then<br />
report to read then display the result.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/02/20 17:45:12;  author: root;  state: Exp;  lines: +1 -1<br />
In file add a count varable how many bytes write a request_client in fifo then return a count any case count falied then then report it.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/02/20 13:17:05;  author: root;  state: Exp;  lines: +1 -0<br />
In file decalre a fd,count variables.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/02/20 13:16:15;  author: root;  state: Exp;  lines: +3 -3<br />
In file some removes a bugs<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/02/20 13:14:12;  author: root;  state: Exp;  lines: +1 -1<br />
In file included request.h file corrections the speling mistake .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/02/20 05:34:55;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: server.c,v<br />
Working file: server.c<br />
head: 1.43<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 43;    selected revisions: 43<br />
description:<br />
In file decalre a structure variable then check if user allow a permissions then create a fifo then read  a structure<br />
then display a structure .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.43<br />
date: 2016/02/25 08:28:56;  author: root;  state: Exp;  lines: +1 -1<br />
In file create a thread semaphore in semaphore a some eshu then resolve this .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.42<br />
date: 2016/02/25 06:25:03;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.41<br />
date: 2016/02/25 06:22:47;  author: root;  state: Exp;  lines: +3 -3<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.40<br />
date: 2016/02/25 06:15:14;  author: root;  state: Exp;  lines: +0 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.39<br />
date: 2016/02/25 06:13:16;  author: root;  state: Exp;  lines: +2 -5<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.38<br />
date: 2016/02/25 05:58:10;  author: root;  state: Exp;  lines: +0 -1<br />
*** empty log message ***<br />
revision 1.37<br />
date: 2016/02/25 05:52:27;  author: root;  state: Exp;  lines: +25 -30<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.36<br />
date: 2016/02/24 12:36:19;  author: root;  state: Exp;  lines: +3 -4<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.35<br />
date: 2016/02/24 12:30:26;  author: root;  state: Exp;  lines: +44 -39<br />
In file add a some if conditions.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.34<br />
date: 2016/02/24 11:36:48;  author: root;  state: Exp;  lines: +6 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.33<br />
date: 2016/02/24 11:04:45;  author: root;  state: Exp;  lines: +10 -4<br />
In file calling a sem_wait and sem_post in 6 times and display the 6 times.<br />
.\<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.32<br />
date: 2016/02/24 10:30:02;  author: root;  state: Exp;  lines: +3 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.31<br />
date: 2016/02/24 10:08:40;  author: root;  state: Exp;  lines: +2 -5<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.30<br />
date: 2016/02/24 10:04:01;  author: root;  state: Exp;  lines: +9 -7<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.29<br />
date: 2016/02/24 09:59:50;  author: root;  state: Exp;  lines: +6 -3<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.28<br />
date: 2016/02/24 09:31:47;  author: root;  state: Exp;  lines: +3 -2<br />
In file create thread before call to the sem_wait thread beacuse this thread is working of ready any other thread din&#8217;t interupted then write a data and then call to sem_post beasue this work is complted this main_thread out of critical<br />
sections.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.27<br />
date: 2016/02/24 09:14:06;  author: root;  state: Exp;  lines: +1 -1<br />
In file remove a some errors.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.26<br />
date: 2016/02/24 08:52:01;  author: root;  state: Exp;  lines: +15 -15<br />
In file create a thread semhaphore a and then add a condtions if any cases falied a so return -1 or any negative value<br />
and report the sem_init then add a sem_wait beause In critial section in thread then thread sem_post call then move<br />
and critical section  in main thread<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.25<br />
date: 2016/02/23 16:41:47;  author: root;  state: Exp;  lines: +9 -13<br />
In file sleep(3) is system call removes and this replace a in pause and make a signal handler SIGINT signal and this<br />
handler function calling the in server means main thread .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.24<br />
date: 2016/02/23 11:29:29;  author: root;  state: Exp;  lines: +2 -2<br />
In file just checking<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.23<br />
date: 2016/02/23 10:26:22;  author: root;  state: Exp;  lines: +29 -2<br />
Im file send a signal send a SIGINT siganl in request client process .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.22<br />
date: 2016/02/21 11:34:48;  author: root;  state: Exp;  lines: +0 -1<br />
In file check how working..<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.21<br />
date: 2016/02/21 11:19:41;  author: root;  state: Exp;  lines: +21 -0<br />
In file get a result then open a fifo in write only mode then if fd is no is negative then report the open and out<br />
then write a result if any condition write is failed then report to write .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.20<br />
date: 2016/02/21 10:52:08;  author: root;  state: Exp;  lines: +2 -3<br />
In file add twos sleep in 2-2 sec .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.19<br />
date: 2016/02/21 09:44:06;  author: root;  state: Exp;  lines: +8 -0<br />
In file open a fifo then read only mode then read a result then display the result in server.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.18<br />
date: 2016/02/21 09:26:33;  author: root;  state: Exp;  lines: +1 -0<br />
In file add a sleep in 2 second .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.17<br />
date: 2016/02/21 09:25:17;  author: root;  state: Exp;  lines: +0 -1<br />
In file sleep is removed<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16<br />
date: 2016/02/21 09:18:30;  author: root;  state: Exp;  lines: +2 -2<br />
In file add a sleep in 3 second .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2016/02/21 08:41:43;  author: root;  state: Exp;  lines: +0 -1<br />
/.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2016/02/21 08:16:40;  author: root;  state: Exp;  lines: +1 -0<br />
In file c is decalre variable.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2016/02/21 08:15:39;  author: root;  state: Exp;  lines: +1 -1<br />
In file pass a agrument in thread c<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2016/02/21 08:14:14;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/02/21 08:12:39;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/02/21 08:09:56;  author: root;  state: Exp;  lines: +1 -1<br />
In file pass the argument in thread calling tym in server and before types to chnge a void * varbale .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/02/21 08:04:33;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/02/21 08:02:35;  author: root;  state: Exp;  lines: +1 -1<br />
In file put the NULL is some error then type cast is void *<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/02/21 08:01:09;  author: root;  state: Exp;  lines: +1 -1<br />
In file thread calling in agrument is NULL.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/02/21 07:54:08;  author: root;  state: Exp;  lines: +1 -1<br />
In file correction the thread_create to chnge pthread_create and give the thread id is reffrence<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/02/21 07:49:55;  author: root;  state: Exp;  lines: +2 -2<br />
In file declare a thread_id variable this data type of pthread_t<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/02/21 07:43:08;  author: root;  state: Exp;  lines: +14 -0<br />
In file firstly create a thread then thread created then open a fifo in write only mode then write a the data in fifo.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/02/20 17:58:58;  author: root;  state: Exp;  lines: +2 -2<br />
date: 2016/02/20 17:58:58;  author: root;  state: Exp;  lines: +2 -2<br />
In file server how many read a bytes sucessfully then return a no. of bytes store in count if read is failed then reporreport the read call .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/02/20 05:54:11;  author: root;  state: Exp;  lines: +3 -1<br />
In file declare a variables .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/02/20 05:35:20;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
(-SHELL SCRIPT-<br />
#! /bin/bash</p>
<p>delete()<br />
{<br />
rm -rf request_client<br />
rm -rf *.o<br />
rm -rf server<br />
}</p>
<p>edit()<br />
{<br />
read -p &#8220;do you want a edit further (y or n)&#8221; answer</p>
<p>if [ 'y' = $answer ]<br />
then</p>
<p>for file in $(ls *.h,v)<br />
do<br />
co -l $file<br />
done</p>
<p>for file in $(ls *.c,v)<br />
do<br />
co -l $file<br />
done<br />
delete<br />
exit 0<br />
fi</p>
<p>}</p>
<p>execute()<br />
{<br />
read -p &#8220;do you want a compile a project&#8221; answer</p>
<p>if [ 'y' = $answer ]<br />
then<br />
if ( gcc -c  server.c -lpthread)<br />
then<br />
echo &#8220;compile is successfull&#8221;<br />
else<br />
echo &#8220;compile is failed&#8221;<br />
edit<br />
fi</p>
<p>if ( gcc -o request_client request_client.c )<br />
then<br />
echo &#8220;compile is sucessfull&#8221;<br />
else<br />
echo &#8220;compile is failed&#8221;<br />
edit<br />
fi</p>
<p>if ( gcc -c processing_client.c -lpthread )<br />
then<br />
echo &#8220;compile is sucessfull&#8221;<br />
else<br />
echo &#8220;compile is failed&#8221;<br />
edit<br />
fi<br />
else<br />
edit<br />
fi</p>
<p>read -p &#8220;do you want a execute this project&#8221; answer</p>
<p>if [ 'y' = $answer ]<br />
then<br />
if (gcc -o server server.o processing_client.o -lpthread)<br />
then<br />
./server &amp; ./request_client -lpthread<br />
else<br />
echo &#8220;executeable is failed&#8221;<br />
edit<br />
fi<br />
else<br />
edit<br />
fi</p>
<p>}</p>
<p>logfile()<br />
{<br />
read -p &#8220;do you want a run a logfile&#8221; answer<br />
if [ 'y' = $answer ]<br />
then<br />
chmod +x rlog.sh<br />
./rlog.sh<br />
fi<br />
}</p>
<p>for file in $(ls *.h)<br />
do<br />
ci $file<br />
done</p>
<p>for file in $(ls *.c)<br />
do<br />
ci $file<br />
done</p>
<p>for file in $(ls *.h,v)<br />
do<br />
co $file<br />
done</p>
<p>for file in $(ls *.c,v)<br />
do<br />
co $file<br />
done<br />
execute<br />
logfile<br />
edit</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/single-client-server-and-single-thread-communication-with-using-the-shell-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SWAP THE THREE VALUES WITHOUT USING FOURTH VARIABLE</title>
		<link>https://www.emblogic.com/blog/02/swap-the-three-values-without-using-fourth-variable/</link>
		<comments>https://www.emblogic.com/blog/02/swap-the-three-values-without-using-fourth-variable/#comments</comments>
		<pubDate>Tue, 09 Feb 2016 13:24:03 +0000</pubDate>
		<dc:creator><![CDATA[Gurbhej Gill]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13248</guid>
		<description><![CDATA[#include&#60;stdio.h&#62; int main() { int a=5; int b=6; int c=7; a^=b,b^=a,a^=b; b^=c,c^=b,b^=c; printf(&#8220;a= %d\n&#8221;,a); printf(&#8220;b= %d\n&#8221;,b); printf(&#8220;c= %d\n&#8221;,c); return 0; }]]></description>
				<content:encoded><![CDATA[<p>#include&lt;stdio.h&gt;</p>
<p>int main()<br />
{<br />
int a=5;<br />
int b=6;<br />
int c=7;</p>
<p>a^=b,b^=a,a^=b;<br />
b^=c,c^=b,b^=c;</p>
<p>printf(&#8220;a= %d\n&#8221;,a);<br />
printf(&#8220;b= %d\n&#8221;,b);<br />
printf(&#8220;c= %d\n&#8221;,c);</p>
<p>return 0;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/swap-the-three-values-without-using-fourth-variable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SEVER SINGLE CLIENT FIFO AND PIPES WITH USE THE SHELL SCRIPT</title>
		<link>https://www.emblogic.com/blog/02/sever-single-client-fifo-and-pipes-with-use-the-shell-script/</link>
		<comments>https://www.emblogic.com/blog/02/sever-single-client-fifo-and-pipes-with-use-the-shell-script/#comments</comments>
		<pubDate>Sun, 07 Feb 2016 19:15:48 +0000</pubDate>
		<dc:creator><![CDATA[Gurbhej Gill]]></dc:creator>
				<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13240</guid>
		<description><![CDATA[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. &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- revision 1.1 date: 2016/02/04 &#8230; <a href="https://www.emblogic.com/blog/02/sever-single-client-fifo-and-pipes-with-use-the-shell-script/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>RCS file: header.h,v<br />
Working file: header.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;     selected revisions: 1<br />
description:<br />
In file include a all header files realted this project.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/02/04 11:32:41;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: request.h,v<br />
Working file: request.h<br />
head: 1.3<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 3;     selected revisions: 3<br />
description:<br />
In file delacare a structure name is struct opreations and decalre a in member variable .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/02/04 20:20:28;  author: root;  state: Exp;  lines: +0 -1<br />
In file decalre result varable.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/02/04 20:19:24;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/02/04 11:33:11;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: processing_client.c,v<br />
Working file: processing_client.c<br />
head: 1.8<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 8;     selected revisions: 8<br />
description:<br />
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.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/02/07 11:01:05;  author: root;  state: Exp;  lines: +2 -0<br />
In file removes the all sleeps.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/02/04 19:16:31;  author: root;  state: Exp;  lines: +1 -1<br />
In file display a operator.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/02/04 19:14:40;  author: root;  state: Exp;  lines: +1 -1<br />
In file some changing.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/02/04 19:12:48;  author: root;  state: Exp;  lines: +4 -1<br />
In file get a display structure in member variable.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/02/04 19:07:15;  author: root;  state: Exp;  lines: +1 -0<br />
In file calling sleep in 2 sec.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/02/04 19:05:20;  author: root;  state: Exp;  lines: +1 -1<br />
In file now write a result.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/02/04 18:50:16;  author: root;  state: Exp;  lines: +1 -0<br />
In file wfd,rfd and result are variables declare.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/02/04 13:33:06;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: request_client.c,v<br />
Working file: request_client.c<br />
head: 1.8<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 8;     selected revisions: 8<br />
description:<br />
In file declare a struct operations type a variable and all sturcture members in values all assign .<br />
then call to the open and file open the all structure write a in fifo then call to the sleep in 5 sec.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/02/07 11:01:44;  author: root;  state: Exp;  lines: +1 -1<br />
In file check the this file write the data or not.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/02/04 20:20:54;  author: root;  state: Exp;  lines: +1 -1<br />
In file declare a result varibale and display the result .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/02/04 20:19:26;  author: root;  state: Exp;  lines: +7 -9<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/02/04 20:02:32;  author: root;  state: Exp;  lines: +20 -2<br />
In file get a result of the server and display the result and add a if else condition in a file.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/02/04 12:05:34;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/02/04 11:49:47;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/02/04 11:48:32;  author: root;  state: Exp;  lines: +14 -1<br />
In file add a some checking condtions.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/02/04 11:34:07;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: server.c,v<br />
Working file: server.c<br />
head: 1.11<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 11;    selected revisions: 11<br />
description:<br />
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.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/02/07 11:02:37;  author: root;  state: Exp;  lines: +1 -3<br />
In file removes the all sleep.<br />
/.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/02/04 20:05:33;  author: root;  state: Exp;  lines: +15 -0<br />
In file get a result to proceesing client and then in sleep 3 sec then give the result of the request client .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/02/04 19:16:56;  author: root;  state: Exp;  lines: +1 -1<br />
In file read a result .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/02/04 18:55:15;  author: root;  state: Exp;  lines: +3 -3<br />
In file check the working .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/02/04 18:51:20;  author: root;  state: Exp;  lines: +2 -0<br />
In file get result to processing client and display a result in file.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/02/04 13:34:28;  author: root;  state: Exp;  lines: +25 -5<br />
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 .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/02/04 12:05:36;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/02/04 11:53:18;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/02/04 11:52:22;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/02/04 11:43:54;  author: root;  state: Exp;  lines: +2 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/02/04 11:36:18;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
SHELL SCRIPT</p>
<p>#! /bin/bash</p>
<p>delete()<br />
{<br />
rm -rf  server<br />
rm -rf  request_client<br />
}</p>
<p>edit()<br />
{<br />
read -p &#8220;do you want a edit further (y or n)&#8221; answer</p>
<p>if [ 'y' = $answer ]<br />
then</p>
<p>for file in $(ls *.h,v)<br />
do<br />
co -l $file<br />
done</p>
<p>for file in $(ls *.c,v)<br />
do<br />
co -l $file<br />
done<br />
delete<br />
exit 0<br />
fi<br />
}</p>
<p>execute()<br />
{<br />
read -p &#8220;do you want a execute script(y or n)&#8221; answer</p>
<p>if [ 'y' = $answer ]<br />
then<br />
if (gcc -o server server.c)<br />
then<br />
echo &#8220;compailation successfully&#8221;<br />
else<br />
echo &#8220;compailation is failed&#8221;<br />
edit<br />
fi</p>
<p>if (gcc -o request_client request_client.c)<br />
then<br />
echo &#8220;compailation successfully&#8221;<br />
else<br />
echo &#8220;compailation is failed&#8221;<br />
edit<br />
fi<br />
if (gcc -o processing_client processing_client.c)<br />
then<br />
echo &#8220;compailation successfully&#8221;<br />
else<br />
echo &#8220;compailation is failed&#8221;<br />
edit<br />
fi</p>
<p>else<br />
edit<br />
fi<br />
./server &amp; ./request_client<br />
}</p>
<p>logfile()<br />
{<br />
chmod +x rlog.sh<br />
./rlog.sh<br />
edit<br />
}</p>
<p>for file in $(ls *.h)<br />
do<br />
ci $file<br />
done</p>
<p>for file in $(ls *.c)<br />
do<br />
ci $file<br />
done</p>
<p>for file in $(ls *.h,v)<br />
do<br />
co $file<br />
done</p>
<p>for file in $(ls *.c,v)<br />
do<br />
co $file<br />
done<br />
execute<br />
read<br />
logfile</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/sever-single-client-fifo-and-pipes-with-use-the-shell-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SEVER MULTIPLE CLIENT USING PIPES WITH USE A SHELL SCRIPT</title>
		<link>https://www.emblogic.com/blog/02/sever-multiple-client-using-pipes-with-use-a-shell-script/</link>
		<comments>https://www.emblogic.com/blog/02/sever-multiple-client-using-pipes-with-use-a-shell-script/#comments</comments>
		<pubDate>Thu, 04 Feb 2016 18:38:52 +0000</pubDate>
		<dc:creator><![CDATA[Gurbhej Gill]]></dc:creator>
				<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13227</guid>
		<description><![CDATA[RCS file: header.h,v Working file: header.h head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2;     selected revisions: 2 description: In file a include a header files related the this project &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- revision 1.2 date: &#8230; <a href="https://www.emblogic.com/blog/02/sever-multiple-client-using-pipes-with-use-a-shell-script/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>RCS file: header.h,v<br />
Working file: header.h<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;     selected revisions: 2<br />
description:<br />
In file a include a header files related the this project<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/31 10:28:12;  author: root;  state: Exp;  lines: +0 -8<br />
remove a some statement.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/31 09:29:28;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: request.h,v<br />
Working file: request.h<br />
head: 1.3<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 3;     selected revisions: 3<br />
description:<br />
In file a declare structure and in structure a three member variable.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/02/04 06:20:17;  author: root;  state: Exp;  lines: +4 -3<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/02/03 14:13:25;  author: root;  state: Exp;  lines: +5 -1<br />
In file a declare a in structure another member variable.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/31 09:30:01;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: header.h,v<br />
Working file: header.h<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;     selected revisions: 2<br />
description:<br />
In file a include a header files related the this project<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/31 10:28:12;  author: root;  state: Exp;  lines: +0 -8<br />
remove a some statement.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/31 09:29:28;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: request.h,v<br />
Working file: request.h<br />
head: 1.3<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 3;     selected revisions: 3<br />
description:<br />
In file a declare structure and in structure a three member variable.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/02/04 06:20:17;  author: root;  state: Exp;  lines: +4 -3<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/02/03 14:13:25;  author: root;  state: Exp;  lines: +5 -1<br />
In file a declare a in structure another member variable.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/31 09:30:01;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>SHELL SCRIPT</p>
<p>&nbsp;</p>
<p>delete()<br />
{<br />
rm -rf server<br />
rm -rf add_request_client<br />
rm -rf sub_request_client<br />
rm -rf mul_request_client<br />
rm -rf div_request_client<br />
rm -rf add_processing_client<br />
rm -rf sub_processing_client<br />
rm -rf mul_processing_client<br />
rm -rf div_processing_client</p>
<p>}<br />
edit()<br />
{</p>
<p>read -p &#8220;do you want a edit further (y or n) :&#8221; answer<br />
if [ 'y' = $answer ]<br />
then<br />
for file in $(ls *.h)<br />
do<br />
co -l $file<br />
done</p>
<p>for file in $(ls *.c)<br />
do<br />
co -l $file<br />
done</p>
<p>delete<br />
fi<br />
exit 0<br />
}</p>
<p>execute()<br />
{<br />
read -p &#8220;do you want a execute a script :&#8221; answer<br />
if [ 'y' = $answer ]<br />
then</p>
<p>if (gcc -o add_request_client add_request_client.c)<br />
then<br />
echo &#8220;complations is successfull&#8221;<br />
else<br />
echo &#8220;complations is failed&#8221;<br />
edit<br />
fi</p>
<p>if (gcc -o sub_request_client sub_request_client.c)<br />
then<br />
echo &#8220;complations is successfull&#8221;<br />
else<br />
echo &#8220;complations is failed&#8221;<br />
edit<br />
fi<br />
if (gcc -o mul_request_client mul_request_client.c)<br />
then<br />
echo &#8220;complations is successfull&#8221;<br />
else<br />
echo &#8220;complations is failed&#8221;<br />
edit<br />
fi</p>
<p>if (gcc -o div_request_client div_request_client.c)<br />
then<br />
echo &#8220;complations is successfull&#8221;<br />
else<br />
echo &#8220;complations is failed&#8221;<br />
edit<br />
fi</p>
<p>if (gcc -o add_processing_client add_processing_client.c)<br />
then<br />
echo &#8220;complations is successfull&#8221;<br />
else<br />
echo &#8220;complation is failed&#8221;<br />
edit<br />
fi<br />
if (gcc -o sub_processing_client sub_processing_client.c)<br />
then<br />
echo &#8220;complations is successfull&#8221;<br />
else<br />
echo &#8220;complation is failed&#8221;<br />
edit<br />
fi<br />
if (gcc -o mul_processing_client mul_processing_client.c)<br />
then<br />
echo &#8220;complations is successfull&#8221;<br />
else<br />
echo &#8220;complation is failed&#8221;<br />
edit<br />
fi</p>
<p>if (gcc -o div_processing_client div_processing_client.c)<br />
then<br />
echo &#8220;complations is successfull&#8221;<br />
else<br />
echo &#8220;complation is failed&#8221;<br />
edit<br />
fi</p>
<p>if (gcc -o server server.c)<br />
then<br />
echo &#8220;complations is successfull&#8221;<br />
else<br />
echo &#8220;complation is failed&#8221;<br />
edit<br />
fi</p>
<p>else<br />
edit<br />
fi</p>
<p>./server<br />
}</p>
<p>logfile()<br />
{<br />
read -p &#8220;do you want a run a logfile :&#8221; answer</p>
<p>if [ 'y' = $answer ]<br />
then<br />
chmod +x rlog.sh<br />
./rlog.sh<br />
fi<br />
edit</p>
<p>}</p>
<p>for file in $(ls *.h)<br />
do<br />
ci $file<br />
done</p>
<p>for file in $(ls *.c)<br />
do<br />
ci $file<br />
done</p>
<p>for file in $(ls *.h,v)<br />
do<br />
co $file<br />
done</p>
<p>for file in $(ls *.c,v)<br />
do<br />
co $file<br />
done</p>
<p>execute<br />
read<br />
logfile</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/sever-multiple-client-using-pipes-with-use-a-shell-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
