<?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; ipc</title>
	<atom:link href="https://www.emblogic.com/blog/tag/ipc/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>Socket programming based Home Automation</title>
		<link>https://www.emblogic.com/blog/12/home-automation-based-socket-programming/</link>
		<comments>https://www.emblogic.com/blog/12/home-automation-based-socket-programming/#comments</comments>
		<pubDate>Fri, 09 Dec 2016 12:04:21 +0000</pubDate>
		<dc:creator><![CDATA[Raghu Nath]]></dc:creator>
				<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[Project 04: FTP based Client Server using Threads and Sockets]]></category>
		<category><![CDATA[Project 6: Client Server using Inter Process Communication Mechanism]]></category>
		<category><![CDATA[Project 9: Embedded Linux on ARM]]></category>
		<category><![CDATA[Embedded Linux]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[server-client]]></category>
		<category><![CDATA[sockets]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13709</guid>
		<description><![CDATA[The main aim of this project is to implement Socket programming using Embedded linux based boards using beagle bone as server and pc as a client. The entire electrical system like home appliances are interfaced to Server (Beagle bone black) &#8230; <a href="https://www.emblogic.com/blog/12/home-automation-based-socket-programming/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>The main aim of this project is to implement Socket programming using Embedded linux based boards using beagle bone as server and pc as a client. The entire electrical system like home appliances are interfaced to Server (Beagle bone black) using relay electronics system.There will be authentication system for accessing the server like user id and password which will be provided by  user through client.The enhancement of authentication system will be based on shell scripts.The user can control any appliance at any time from linux terminal.The user will run application based code which is interfaced to the Client program by providing basic authentication. An acknowledgement is also provided to user to monitor the status of the Appliance by server.The protocol used here is TCP (Transmission Control protocol)Client Server model, The Client will send the request to server.The Server process takes a request from the client. After getting a request from the client, this process will perform the required processing, gather the requested information, and send it to the requester client. The user will provide some input data by command line arguments to application Client.The beagle bone  Server application will be automated  after initial boot power-on with the help of bashRC Scripting.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/home-automation-based-socket-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Send a signal -Using Kill command</title>
		<link>https://www.emblogic.com/blog/01/how-to-send-a-signal-using-kill-command/</link>
		<comments>https://www.emblogic.com/blog/01/how-to-send-a-signal-using-kill-command/#comments</comments>
		<pubDate>Fri, 15 Jan 2016 12:01:08 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Linux Internals and System Programming]]></category>
		<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[kill]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux system programming]]></category>
		<category><![CDATA[pid]]></category>
		<category><![CDATA[sending signals]]></category>
		<category><![CDATA[signal]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13175</guid>
		<description><![CDATA[Send a signal by Kill command ======================= - To send a signal to a process other than current task. - It has prototype :- int kill(pid_t pid, int signo); - It is included using header :- #include&#60;signal.h&#62; - The system &#8230; <a href="https://www.emblogic.com/blog/01/how-to-send-a-signal-using-kill-command/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Send a signal by Kill command<br />
=======================<br />
- To send a signal to a process other than current task.<br />
- It has prototype :-<br />
int kill(pid_t pid, int signo);<br />
- It is included using header :-<br />
#include&lt;signal.h&gt;<br />
- The system data type pid_t is defined in header :-<br />
#include&lt;sys/types.h&gt;<br />
- signo is the signal number of signal to be send.<br />
- pid is the PID of the process to which signal is to be send.<br />
- pid can take value:-<br />
* 0 &#8211;&gt; To send signo signal to every process in invoking process&#8217; process group<br />
* -1 &#8211;&gt;To send signo signal to every process for which invoking process has permission to send a signal, except itself and init<br />
* n(&lt;-1) &#8211;&gt; All process in process group<br />
* n(&gt;0)  &#8211;&gt; process with PID n is signalled.<br />
- This take an optional signal name or number and the PID to send the signal.</p>
<p>- For eg. To send &#8216;hangup&#8217; signal to shell running on PID 1001, we use command :-<br />
kill(1001,HUP);<br />
- killall is used to send signal to all the processes running.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/how-to-send-a-signal-using-kill-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to register a signal</title>
		<link>https://www.emblogic.com/blog/01/how-to-register-a-signal/</link>
		<comments>https://www.emblogic.com/blog/01/how-to-register-a-signal/#comments</comments>
		<pubDate>Fri, 15 Jan 2016 11:59:04 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Linux Internals and System Programming]]></category>
		<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux system programming]]></category>
		<category><![CDATA[register a signal]]></category>
		<category><![CDATA[signals]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13173</guid>
		<description><![CDATA[Register a signal ================== - Program can handle a signal using signal library function signal(). - signal() is used to register the signal handler function with kernel on behalf of current process. - It is included in header :- #include&#60;header.h&#62; &#8230; <a href="https://www.emblogic.com/blog/01/how-to-register-a-signal/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Register a signal<br />
==================<br />
- Program can handle a signal using signal library function signal().<br />
- signal() is used to register the signal handler function with kernel on behalf of current process.<br />
- It is included in header :-<br />
#include&lt;header.h&gt;<br />
- Prototype of function is :-<br />
void* (signal(int signo,void(*func)(int)))(int);<br />
- signal() function takes 2 parameters, signo and func.<br />
- The signal to be caught or ignored is given as argument signo.<br />
- The function to be called when the specified signal is received is given as func.<br />
- The function must take a single int argument (the signal received) and has return type void.</p>
<p>- The signal() command can be used in 3 modes :-<br />
(i) Default mode (Terminate the process)<br />
SIG_DFL &#8211;&gt; is used in place of func.<br />
(ii) Ignore the signal<br />
SIG_IGN &#8211;&gt; is used in place of func.<br />
(iii) User defined mode<br />
User defined function is used in place of func.</p>
<p>- The signal command returns the function which is setup to handle the signal, SIG_DFL or SIG_IGN in 3rd, 1st and 2nd cases respectively.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/how-to-register-a-signal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>About Signals</title>
		<link>https://www.emblogic.com/blog/01/about-signals/</link>
		<comments>https://www.emblogic.com/blog/01/about-signals/#comments</comments>
		<pubDate>Fri, 15 Jan 2016 11:57:12 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Linux Internals and System Programming]]></category>
		<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[signals]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13171</guid>
		<description><![CDATA[Signals ======== - A signal is an event generated by UNIX/LINUX system in response to some condition. - On receipt of a signal, process may in turn take some action. - Signals are generated by some error conditions such as:- &#8230; <a href="https://www.emblogic.com/blog/01/about-signals/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Signals<br />
========<br />
- A signal is an event generated by UNIX/LINUX system in response to some condition.<br />
- On receipt of a signal, process may in turn take some action.<br />
- Signals are generated by some error conditions such as:-<br />
* Memory Segment Violation<br />
* Floating Point Processor error<br />
* Illegal Instruction etc.<br />
- They are generated by shell and terminal handlers.<br />
- They cause interrupts.</p>
<p>- They can also be used to sent from one process to another as a way of passing information or modifying behaviour.</p>
<p>- As default, if a process receives any signal, process will be terminated immediately.<br />
- Usually a core dump file is created.</p>
<p>- The signals are defined by including header file signal.h<br />
- They all begn with &#8220;SIG&#8221;.<br />
- There are 64 signals in LINUX.<br />
- The can be listed using command :-<br />
kill -l<br />
- Some of the signals are :-</p>
<p>Signal Name       Description<br />
SIGABORT          Process Abort<br />
SIGALRM           Alarm Clock<br />
SIGFPE            Floating Point Exception<br />
SIGHUP            Hangup<br />
SIGILL            Illegal Instruction<br />
SIGINT            Terminal Interrupt<br />
SIGKILL           Kill (can&#8217;t be caught or ignored)<br />
SIGPIPE           Write on a pipe with no reader<br />
SIGQUIT           Terminal Quit<br />
SIGSEGV           Invalid memory segment access (Segmentation Fault)<br />
SIGTERM           Termination<br />
SIGUSR1           User-defined signal 1<br />
SIGUSR2           User-defined signal 2</p>
<p>SIGCHLD           Child process has stopped or exited<br />
SIGCONT           Continue exexuting, if stopped<br />
SIGSTOP           Stop Executing (Can&#8217;t be caught or ignored)<br />
SIGTSTP           Terminal stop signal<br />
SIGTTIN           Background process trying to read<br />
SIGTTOU           Background process trying to write</p>
<p>- SIGINT can be called using Ctrl-C<br />
- A signal has 3 steps:-<br />
1) raise<br />
2) catch<br />
3) ignore/handle</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/about-signals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Types of Interprocess Communications in Linux</title>
		<link>https://www.emblogic.com/blog/01/types-of-interprocess-communications-in-linux/</link>
		<comments>https://www.emblogic.com/blog/01/types-of-interprocess-communications-in-linux/#comments</comments>
		<pubDate>Thu, 14 Jan 2016 18:04:13 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[types]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13152</guid>
		<description><![CDATA[Types of Inter-process Communications (IPCs) in Linux : 1. Pipes 2. Named Pipes/FIFO 3. Signals 4. Semaphores 5. Message Queue 6. Shared Memory &#160;]]></description>
				<content:encoded><![CDATA[<p>Types of Inter-process Communications (IPCs) in Linux :</p>
<p>1. Pipes</p>
<p>2. Named Pipes/FIFO</p>
<p>3. Signals</p>
<p>4. Semaphores</p>
<p>5. Message Queue</p>
<p>6. Shared Memory</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/types-of-interprocess-communications-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Client Server Using IPC by using message queues and pipes for single user</title>
		<link>https://www.emblogic.com/blog/01/client-server-using-ipc-by-using-message-queues-and-pipes-for-single-user/</link>
		<comments>https://www.emblogic.com/blog/01/client-server-using-ipc-by-using-message-queues-and-pipes-for-single-user/#comments</comments>
		<pubDate>Fri, 08 Jan 2016 07:37:11 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[client-server]]></category>
		<category><![CDATA[Embedded]]></category>
		<category><![CDATA[embedded c]]></category>
		<category><![CDATA[Embedded Linux]]></category>
		<category><![CDATA[FIFO]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13133</guid>
		<description><![CDATA[logfile of project ============= ============= RCS file: header.h,v Working file: header.h head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2;    selected revisions: 2 description: It includes basic headers for implementation It includes &#8230; <a href="https://www.emblogic.com/blog/01/client-server-using-ipc-by-using-message-queues-and-pipes-for-single-user/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>logfile of project</p>
<p>=============</p>
<p>=============<br />
RCS file: header.h,v<br />
Working file: header.h<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
root: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;    selected revisions: 2<br />
description:<br />
It includes basic headers for implementation<br />
It includes stdio.h, fcntl.h etc.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2    locked by: root;<br />
date: 2016/01/06 18:46:13;  author: root;  state: Exp;  lines: +2 -0<br />
sys/ipc.h , sys/msg.h is included.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/06 18:38:00;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: adder.c,v<br />
Working file: adder.c<br />
head: 1.3<br />
branch:<br />
locks: strict<br />
root: 1.3<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 3;    selected revisions: 3<br />
description:<br />
It is processing client which gives result of addition of two objects.<br />
It communicate via fifo.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3    locked by: root;<br />
date: 2016/01/06 18:50:27;  author: root;  state: Exp;  lines: +2 -2<br />
my_message is defined.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/06 18:43:53;  author: root;  state: Exp;  lines: +1 -1<br />
The header message.h is included.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/06 18:33:35;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client1.c,v<br />
Working file: client1.c<br />
head: 1.12<br />
branch:<br />
locks: strict<br />
root: 1.12<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 12;    selected revisions: 12<br />
description:<br />
It request server for adding through Message Queue<br />
It reads result from server through Message Queue<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12    locked by: root;<br />
date: 2016/01/07 14:11:54;  author: root;  state: Exp;  lines: +2 -0<br />
message queue terminated in client<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/01/07 13:37:54;  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/01/07 13:32:19;  author: root;  state: Exp;  lines: +2 -2<br />
message type is specified<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/07 13:25:39;  author: root;  state: Exp;  lines: +2 -2<br />
different key is used for server and client.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/07 13:21:47;  author: root;  state: Exp;  lines: +1 -1<br />
values of objects changed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/07 13:10:40;  author: root;  state: Exp;  lines: +1 -1<br />
id is changed<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/06 19:06:15;  author: root;  state: Exp;  lines: +1 -1<br />
Message id sent to server is used for the sent message.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/06 19:00:36;  author: root;  state: Exp;  lines: +1 -1<br />
obj1 is used.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/06 18:53:47;  author: root;  state: Exp;  lines: +1 -0<br />
msqid id declared.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/06 18:52:17;  author: root;  state: Exp;  lines: +1 -2<br />
compilation errors resolving.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/06 18:44:11;  author: root;  state: Exp;  lines: +1 -1<br />
Message.h is included.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/06 18:34:29;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client2.c,v<br />
Working file: client2.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
It reads result from server through Message Queue<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2016/01/06 18:35:43;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client3.c,v<br />
Working file: client3.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
It reads result from server through Message Queue<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2016/01/06 18:36:09;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: multiplier.c,v<br />
Working file: multiplier.c<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
root: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;    selected revisions: 2<br />
description:<br />
It gives result the multiplication of 2 objects.<br />
It communicate through pipes.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2    locked by: root;<br />
date: 2016/01/06 18:44:23;  author: root;  state: Exp;  lines: +1 -1<br />
message.h is included.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/06 18:36:13;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: server.c,v<br />
Working file: server.c<br />
head: 1.16<br />
branch:<br />
locks: strict<br />
root: 1.16<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 16;    selected revisions: 16<br />
description:<br />
It takes request from client throughr Message Queue<br />
It takes result via Pipe from Processing Client.<br />
It writes result to client through Message Queue.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16    locked by: root;<br />
date: 2016/01/07 14:25:42;  author: root;  state: Exp;  lines: +1 -1<br />
mode change from 777 to 666.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2016/01/07 14:13:12;  author: root;  state: Exp;  lines: +0 -1<br />
message queue not deleted here.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2016/01/07 14:06:25;  author: root;  state: Exp;  lines: +2 -0<br />
Message Queue is destroyed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2016/01/07 13:51:40;  author: root;  state: Exp;  lines: +2 -0<br />
2 message queues are used.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2016/01/07 13:43:31;  author: root;  state: Exp;  lines: +1 -1<br />
Flag is set to IPC_NOWAIT<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/01/07 13:37:58;  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/01/07 13:32:33;  author: root;  state: Exp;  lines: +1 -1<br />
message type is specified.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/07 13:14:45;  author: root;  state: Exp;  lines: +5 -5<br />
A new struct my_message type variable result is declared.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/07 13:10:48;  author: root;  state: Exp;  lines: +1 -1<br />
id is changed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/07 13:03:20;  author: root;  state: Exp;  lines: +3 -2<br />
Error condition of message send is checked.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/07 12:55:29;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/06 19:06:34;  author: root;  state: Exp;  lines: +1 -1<br />
Message id is used.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/06 18:59:02;  author: root;  state: Exp;  lines: +2 -2<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/06 18:57:45;  author: root;  state: Exp;  lines: +1 -1<br />
req is defined.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/06 18:56:41;  author: root;  state: Exp;  lines: +1 -2<br />
Compilation errors resolving.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/06 18:36:43;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/client-server-using-ipc-by-using-message-queues-and-pipes-for-single-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CIient Server using IPC for FIFO,Pipes and Signals for n clients</title>
		<link>https://www.emblogic.com/blog/01/ciient-server-using-ipc-for-fifopipes-and-signals-for-n-clients/</link>
		<comments>https://www.emblogic.com/blog/01/ciient-server-using-ipc-for-fifopipes-and-signals-for-n-clients/#comments</comments>
		<pubDate>Thu, 07 Jan 2016 09:16:21 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[client-server]]></category>
		<category><![CDATA[embedded c]]></category>
		<category><![CDATA[Embedded Linux]]></category>
		<category><![CDATA[FIFO]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[signals]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13122</guid>
		<description><![CDATA[RCS file: header.h,v Working file: header.h head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2;    selected revisions: 2 description: It includes basic headerfiles for FIFOs. It contains stdio.h, fcntl.h, unistd.h, sys/types.h, sys/stat.h &#8230; <a href="https://www.emblogic.com/blog/01/ciient-server-using-ipc-for-fifopipes-and-signals-for-n-clients/">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 />
root: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;    selected revisions: 2<br />
description:<br />
It includes basic headerfiles for FIFOs.<br />
It contains stdio.h, fcntl.h, unistd.h, sys/types.h, sys/stat.h<br />
It contains #ifndef HEADERS to avoid multiple declaration of heders by differnt files.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2    locked by: root;<br />
date: 2016/01/01 02:10:15;  author: root;  state: Exp;  lines: +1 -0<br />
signal.h is included for using kill operation.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 04:54:01;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: request.h,v<br />
Working file: request.h<br />
head: 1.19<br />
branch:<br />
locks: strict<br />
root: 1.19<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 19;    selected revisions: 19<br />
description:<br />
It contains struct request<br />
It is format of basic client request.<br />
It contains client PID, 2 objects,operation to be performed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.19    locked by: root;<br />
date: 2016/01/06 10:22:24;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.18<br />
date: 2016/01/04 11:02:29;  author: root;  state: Exp;  lines: +1 -1<br />
maximum clients are changed from 1000 to 10000.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.17<br />
date: 2016/01/04 10:39:25;  author: root;  state: Exp;  lines: +1 -1<br />
No. of MAX_CLIENT increased to 1000.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16<br />
date: 2016/01/01 02:30:39;  author: root;  state: Exp;  lines: +1 -1<br />
No. of clients = 100<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2016/01/01 02:13:15;  author: root;  state: Exp;  lines: +2 -0<br />
signal.h is included.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2015/12/21 09:54:15;  author: root;  state: Exp;  lines: +1 -1<br />
CIIENT_MAX = 5<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2015/12/21 09:45:17;  author: root;  state: Exp;  lines: +1 -1<br />
No. of clients increased to 1114.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2015/12/21 09:27:52;  author: root;  state: Exp;  lines: +1 -1<br />
No. of clients is 114.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2015/12/21 09:13:31;  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: 2015/12/21 09:07:47;  author: root;  state: Exp;  lines: +1 -1<br />
No. of clients is increased from 4 to 5.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2015/12/21 08:50:23;  author: root;  state: Exp;  lines: +1 -1<br />
No. of MAX_CLIENT becomes 4<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2015/12/21 07:09:44;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/12/21 05:56:59;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/12/21 05:52:10;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/12/21 05:50: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.4<br />
date: 2015/12/21 05:46:10;  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: 2015/12/21 05:32:51;  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: 2015/12/21 05:27:31;  author: root;  state: Exp;  lines: +1 -1<br />
Macro of REQUESTFIFO is redefined which contains a %d which will be its PID.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 04:56:38;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: adder.c,v<br />
Working file: adder.c<br />
head: 1.4<br />
branch:<br />
locks: strict<br />
root: 1.4<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 4;    selected revisions: 4<br />
description:<br />
adder has command line arguments which contains File Descriptors of pipe.<br />
adder read request from server for adding 2 objects<br />
adder write result(int) into server.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4    locked by: root;<br />
date: 2016/01/06 08:52:29;  author: root;  state: Exp;  lines: +1 -1<br />
signal is removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/01 02:07:16;  author: root;  state: Exp;  lines: +2 -1<br />
alarm signal is send to server after it writes result to server<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 09:59:14;  author: root;  state: Exp;  lines: +1 -1<br />
print statement decreased.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 04:40:12;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client1.c,v<br />
Working file: client1.c<br />
head: 1.15<br />
branch:<br />
locks: strict<br />
root: 1.15<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 15;    selected revisions: 15<br />
description:<br />
It open the requestfifo<br />
Write request for addition using struct request to server<br />
Then, it reads result(int) from server.<br />
Before reading result &#8220;resultfifo&#8221; is being created by client.<br />
Different clients uses same requestfifo but they have unique resultfifo which is created by client itself.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15    locked by: root;<br />
date: 2015/12/21 10:05:47;  author: root;  state: Exp;  lines: +5 -5<br />
print staements removed<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2015/12/21 06:16: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.13<br />
date: 2015/12/21 06:11:20;  author: root;  state: Exp;  lines: +7 -7<br />
name of arr changes to client_fifo<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2015/12/21 05:59:17;  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: 2015/12/21 05:56:32;  author: root;  state: Exp;  lines: +3 -3<br />
arr data type changes from char * to string.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2015/12/21 05:52:06;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2015/12/21 05:50:02;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2015/12/21 05:46:08;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/12/21 05:41:58;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/12/21 05:39:43;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/12/21 05:35:20;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/12/21 05:34: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.3<br />
date: 2015/12/21 05:32:47;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 05:27:08;  author: root;  state: Exp;  lines: +3 -1<br />
sprintf() is used for creating client address.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 04:42:31;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client2.c,v<br />
Working file: client2.c<br />
head: 1.3<br />
branch:<br />
locks: strict<br />
root: 1.3<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 3;    selected revisions: 3<br />
description:<br />
client2 request for subtraction from the server.<br />
It writes its request from requestfifo.<br />
And it creates the resultfifo.<br />
And it reads result from server through resultfifo.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3    locked by: root;<br />
date: 2015/12/21 10:06:09;  author: root;  state: Exp;  lines: +4 -4<br />
print staements removed<br />
&gt;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 06:36:30;  author: root;  state: Exp;  lines: +7 -4<br />
client_fifo is introduced.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 05:09:19;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client3.c,v<br />
Working file: client3.c<br />
head: 1.4<br />
branch:<br />
locks: strict<br />
root: 1.4<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 4;    selected revisions: 4<br />
description:<br />
This client request for multiplication.<br />
It writes request to server through requestfifo.<br />
It creates resultfifo.<br />
It reads result from server through resultfifo.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4    locked by: root;<br />
date: 2015/12/21 10:06:20;  author: root;  state: Exp;  lines: +5 -5<br />
print staements removed<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/12/21 06:37:03;  author: root;  state: Exp;  lines: +7 -4<br />
client_fifo is introduced.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 05:16:34;  author: root;  state: Exp;  lines: +1 -1<br />
Values of objects changed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 05:14:09;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client4.c,v<br />
Working file: client4.c<br />
head: 1.3<br />
branch:<br />
locks: strict<br />
root: 1.3<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 3;    selected revisions: 3<br />
description:<br />
This client request for modulo (%)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3    locked by: root;<br />
date: 2015/12/21 10:06:24;  author: root;  state: Exp;  lines: +3 -3<br />
print staements removed<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 09:36:57;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 08:49:24;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client5.c,v<br />
Working file: client5.c<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
root: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;    selected revisions: 2<br />
description:<br />
Client5 request for divide operation.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2    locked by: root;<br />
date: 2015/12/21 10:06:27;  author: root;  state: Exp;  lines: +5 -5<br />
print staements removed<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 09:05:44;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: divide.c,v<br />
Working file: divide.c<br />
head: 1.4<br />
branch:<br />
locks: strict<br />
root: 1.4<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 4;    selected revisions: 4<br />
description:<br />
It is used for accepting request for divide i.e when operation=&#8217;/&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4    locked by: root;<br />
date: 2016/01/06 08:52:44;  author: root;  state: Exp;  lines: +1 -1<br />
signal is removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/01 02:08:20;  author: root;  state: Exp;  lines: +3 -2<br />
alarm signal is send to server after it writes result to server<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 09:59:36;  author: root;  state: Exp;  lines: +1 -1<br />
print statement decreased.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 09:06:02;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: modulo.c,v<br />
Working file: modulo.c<br />
head: 1.5<br />
branch:<br />
locks: strict<br />
root: 1.5<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 5;    selected revisions: 5<br />
description:<br />
This gives result of modulo<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5    locked by: root;<br />
date: 2016/01/06 08:52:52;  author: root;  state: Exp;  lines: +1 -1<br />
signal is removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/01 02:08:33;  author: root;  state: Exp;  lines: +3 -2<br />
alarm signal is send to server after it writes result to server<br />
..<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/12/21 09:59:41;  author: root;  state: Exp;  lines: +1 -1<br />
print statement decreased.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 08:53:15;  author: root;  state: Exp;  lines: +1 -1<br />
print statement changes.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 08:49:48;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: multiplier.c,v<br />
Working file: multiplier.c<br />
head: 1.4<br />
branch:<br />
locks: strict<br />
root: 1.4<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 4;    selected revisions: 4<br />
description:<br />
It read request from server from pipe for multiplication purpose.<br />
It prosses the request and get the result.<br />
result is written to server through pipe.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4    locked by: root;<br />
date: 2016/01/06 08:52:59;  author: root;  state: Exp;  lines: +1 -1<br />
signal is received.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/01 02:08:39;  author: root;  state: Exp;  lines: +2 -1<br />
alarm signal is send to server after it writes result to server<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 09:59:45;  author: root;  state: Exp;  lines: +1 -1<br />
print statement decreased.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 04:46:24;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: server.c,v<br />
Working file: server.c<br />
head: 1.46<br />
branch:<br />
locks: strict<br />
root: 1.46<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 46;    selected revisions: 46<br />
description:<br />
Ii can handle only 1 client in this revision.<br />
requestfifo is created.<br />
It reads the request from client.<br />
A pipe is created by server.<br />
This pipe is used to send request to adder.<br />
Then, it read result(int) from adder.<br />
through pipe.<br />
It writes result to the client using resultfifo (of respectice client).<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.46    locked by: root;<br />
date: 2016/01/06 10:22:21;  author: root;  state: Exp;  lines: +0 -10<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.45<br />
date: 2016/01/06 09:13: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.44<br />
date: 2016/01/06 08:53:09;  author: root;  state: Exp;  lines: +3 -3<br />
signal is removed.<br />
wait() is used instead of pause().<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.43<br />
date: 2016/01/04 11:04:33;  author: root;  state: Exp;  lines: +1 -0<br />
rfd and wfd are printed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.42<br />
date: 2016/01/04 11:00:31;  author: root;  state: Exp;  lines: +2 -0<br />
The pipe fd&#8217;s are closed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.41<br />
date: 2016/01/04 10:41:42;  author: root;  state: Exp;  lines: +1 -0<br />
Print statement added to show which no. of cient is accessing th server.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.40<br />
date: 2016/01/04 03:32:19;  author: root;  state: Exp;  lines: +1 -1<br />
No, of clients determination corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.39<br />
date: 2016/01/04 03:11:11;  author: root;  state: Exp;  lines: +1 -0<br />
No.of clients Printed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.38<br />
date: 2016/01/04 03:05:30;  author: root;  state: Exp;  lines: +4 -4<br />
2nd argument of read or write corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.37<br />
date: 2016/01/04 03:03:31;  author: root;  state: Exp;  lines: +28 -28<br />
array of variables changed to simple variables<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.36<br />
date: 2016/01/04 02:54:37;  author: root;  state: Exp;  lines: +2 -3<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.35<br />
date: 2016/01/04 02:52:44;  author: root;  state: Exp;  lines: +2 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.34<br />
date: 2016/01/04 02:46:38;  author: root;  state: Exp;  lines: +2 -6<br />
close() command is removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.33<br />
date: 2016/01/04 02:43:10;  author: root;  state: Exp;  lines: +2 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.32<br />
date: 2016/01/04 02:37:50;  author: root;  state: Exp;  lines: +2 -3<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.31<br />
date: 2016/01/04 02:36:11;  author: root;  state: Exp;  lines: +6 -7<br />
while is used instead of for loop.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.30<br />
date: 2016/01/01 02:12:09;  author: root;  state: Exp;  lines: +1 -1<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.29<br />
date: 2016/01/01 02:08:42;  author: root;  state: Exp;  lines: +12 -1<br />
pause is used instead of wait() before reading result from pipe through calculating client.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.28<br />
date: 2015/12/21 10:10:28;  author: root;  state: Exp;  lines: +2 -2<br />
print removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.27<br />
date: 2015/12/21 10:06:30;  author: root;  state: Exp;  lines: +5 -5<br />
print staements removed<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.26<br />
date: 2015/12/21 09:56:25;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.25<br />
date: 2015/12/21 09:50:03;  author: root;  state: Exp;  lines: +2 -2<br />
Print statement corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.24<br />
date: 2015/12/21 09:41:27;  author: root;  state: Exp;  lines: +1 -0<br />
sleep is replaced by wait()<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.23<br />
date: 2015/12/21 09:38:51;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.22<br />
date: 2015/12/21 09:36:59;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.21<br />
date: 2015/12/21 09:07:13;  author: root;  state: Exp;  lines: +4 -0<br />
divide is also included in operations.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.20<br />
date: 2015/12/21 08:50:02;  author: root;  state: Exp;  lines: +4 -0<br />
modulo choice is added to switch(req.opr)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.19<br />
date: 2015/12/21 08:26:26;  author: root;  state: Exp;  lines: +1 -1<br />
loop is executing one more time.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.18<br />
date: 2015/12/21 08:21:43;  author: root;  state: Exp;  lines: +1 -1<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.17<br />
date: 2015/12/21 08:19:40;  author: root;  state: Exp;  lines: +3 -3<br />
Print statement before writion for calculation added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16<br />
date: 2015/12/21 08:11:55;  author: root;  state: Exp;  lines: +1 -1<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2015/12/21 08:10:57;  author: root;  state: Exp;  lines: +6 -6<br />
Changes in addresses in read and write statements.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2015/12/21 08:00:30;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2015/12/21 07:47:37;  author: root;  state: Exp;  lines: +2 -2<br />
&amp;(req+i) changes to (&amp;req+i)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2015/12/21 07:45:49;  author: root;  state: Exp;  lines: +16 -9<br />
req change to req[i] for client i.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2015/12/21 07:31:19;  author: root;  state: Exp;  lines: +14 -10<br />
fd[i] changes to fd<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2015/12/21 07:12:56;  author: root;  state: Exp;  lines: +5 -5<br />
res changes to res[MAX_SIZE]<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2015/12/21 07:07:57;  author: root;  state: Exp;  lines: +35 -35<br />
fd become fd[MAX_CLIENT]<br />
rfd[4] and wfd[4] becomes rfd[MAX_CLIENT][4] and wfd[MAX_CLIENT][4].<br />
count changes to count[MAX_CLIENT]<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2015/12/21 06:58:49;  author: root;  state: Exp;  lines: +2 -2<br />
sleep removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/12/21 06:55:16;  author: root;  state: Exp;  lines: +2 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/12/21 06:18:23;  author: root;  state: Exp;  lines: +1 -1<br />
client_fifo data type changes from char to string.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/12/21 06:16:43;  author: root;  state: Exp;  lines: +1 -1<br />
sprintf() is used for getting RESULTFIFO name.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/12/21 06:11:34;  author: root;  state: Exp;  lines: +3 -1<br />
client_fifo is used for RESULT_FIFO.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/12/21 05:06:34;  author: root;  state: Exp;  lines: +3 -3<br />
+,-,* are replaced by &#8216;+&#8217;,&#8217;-&#8217;,&#8217;*&#8217; respectively in switch case of operation.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 05:04:10;  author: root;  state: Exp;  lines: +13 -3<br />
execl() for subtractor and multiplier are also included along with addition in a switch case which depend on operand of the request by the client.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 04:47:51;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: subtractor.c,v<br />
Working file: subtractor.c<br />
head: 1.11<br />
branch:<br />
locks: strict<br />
root: 1.11<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 11;    selected revisions: 11<br />
description:<br />
It reads request from server through pipe for subtraction purpose.<br />
It processes the request and get the result.<br />
result is send to server by the pipe.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11    locked by: root;<br />
date: 2016/01/06 08:53:35;  author: root;  state: Exp;  lines: +2 -2<br />
kill() is removed.<br />
signal is not used.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/01/04 10:56:49;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/04 10:56:16;  author: root;  state: Exp;  lines: +4 -3<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/04 10:52:54;  author: root;  state: Exp;  lines: +2 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/04 10:51:58;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/04 10:51:23;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/04 10:50:54;  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/01/04 10:47:34;  author: root;  state: Exp;  lines: +1 -1<br />
exit function is used instead of return.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/01 02:09:33;  author: root;  state: Exp;  lines: +3 -2<br />
alarm signal is send to server after it writes result to server<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 09:59:50;  author: root;  state: Exp;  lines: +1 -1<br />
print statement decreased.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 04:52:26;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/ciient-server-using-ipc-for-fifopipes-and-signals-for-n-clients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Client Server communication in IPC using FIFO for 3 clients</title>
		<link>https://www.emblogic.com/blog/01/client-server-communication-in-ipc-using-fifo-for-3-clients/</link>
		<comments>https://www.emblogic.com/blog/01/client-server-communication-in-ipc-using-fifo-for-3-clients/#comments</comments>
		<pubDate>Wed, 06 Jan 2016 05:35:31 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[client-server]]></category>
		<category><![CDATA[embedded c]]></category>
		<category><![CDATA[Embedded Linux]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[FIFO]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pipes]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13118</guid>
		<description><![CDATA[Logfile of Project &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; RCS file: header.h,v Working file: header.h head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1;    selected revisions: 1 description: It includes basic headerfiles for FIFOs. It contains &#8230; <a href="https://www.emblogic.com/blog/01/client-server-communication-in-ipc-using-fifo-for-3-clients/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Logfile of Project</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
RCS file: header.h,v<br />
Working file: header.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
It includes basic headerfiles for FIFOs.<br />
It contains stdio.h, fcntl.h, unistd.h, sys/types.h, sys/stat.h<br />
It contains #ifndef HEADERS to avoid multiple declaration of heders by differnt files.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2015/12/21 04:54:01;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: request.h,v<br />
Working file: request.h<br />
head: 1.7<br />
branch:<br />
locks: strict<br />
root: 1.7<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 7;    selected revisions: 7<br />
description:<br />
It contains struct request<br />
It is format of basic client request.<br />
It contains client PID, 2 objects,operation to be performed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7    locked by: root;<br />
date: 2015/12/21 05:56:59;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/12/21 05:52:10;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/12/21 05:50: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.4<br />
date: 2015/12/21 05:46:10;  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: 2015/12/21 05:32:51;  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: 2015/12/21 05:27:31;  author: root;  state: Exp;  lines: +1 -1<br />
Macro of REQUESTFIFO is redefined which contains a %d which will be its PID.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 04:56:38;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: adder.c,v<br />
Working file: adder.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
adder has command line arguments which contains File Descriptors of pipe.<br />
adder read request from server for adding 2 objects<br />
adder write result(int) into server.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2015/12/21 04:40:12;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client1.c,v<br />
Working file: client1.c<br />
head: 1.14<br />
branch:<br />
locks: strict<br />
root: 1.14<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 14;    selected revisions: 14<br />
description:<br />
It open the requestfifo<br />
Write request for addition using struct request to server<br />
Then, it reads result(int) from server.<br />
Before reading result &#8220;resultfifo&#8221; is being created by client.<br />
Different clients uses same requestfifo but they have unique resultfifo which is created by client itself.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14    locked by: root;<br />
date: 2015/12/21 06:16: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.13<br />
date: 2015/12/21 06:11:20;  author: root;  state: Exp;  lines: +7 -7<br />
name of arr changes to client_fifo<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2015/12/21 05:59:17;  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: 2015/12/21 05:56:32;  author: root;  state: Exp;  lines: +3 -3<br />
arr data type changes from char * to string.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2015/12/21 05:52:06;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2015/12/21 05:50:02;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2015/12/21 05:46:08;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/12/21 05:41:58;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/12/21 05:39:43;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/12/21 05:35:20;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/12/21 05:34: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.3<br />
date: 2015/12/21 05:32:47;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 05:27:08;  author: root;  state: Exp;  lines: +3 -1<br />
sprintf() is used for creating client address.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 04:42:31;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client2.c,v<br />
Working file: client2.c<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
root: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;    selected revisions: 2<br />
description:<br />
client2 request for subtraction from the server.<br />
It writes its request from requestfifo.<br />
And it creates the resultfifo.<br />
And it reads result from server through resultfifo.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2    locked by: root;<br />
date: 2015/12/21 06:36:30;  author: root;  state: Exp;  lines: +7 -4<br />
client_fifo is introduced.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 05:09:19;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client3.c,v<br />
Working file: client3.c<br />
head: 1.3<br />
branch:<br />
locks: strict<br />
root: 1.3<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 3;    selected revisions: 3<br />
description:<br />
This client request for multiplication.<br />
It writes request to server through requestfifo.<br />
It creates resultfifo.<br />
It reads result from server through resultfifo.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3    locked by: root;<br />
date: 2015/12/21 06:37:03;  author: root;  state: Exp;  lines: +7 -4<br />
client_fifo is introduced.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 05:16:34;  author: root;  state: Exp;  lines: +1 -1<br />
Values of objects changed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 05:14:09;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: multiplier.c,v<br />
Working file: multiplier.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
It read request from server from pipe for multiplication purpose.<br />
It prosses the request and get the result.<br />
result is written to server through pipe.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2015/12/21 04:46:24;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: server.c,v<br />
Working file: server.c<br />
head: 1.6<br />
branch:<br />
locks: strict<br />
root: 1.6<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 6;    selected revisions: 6<br />
description:<br />
Ii can handle only 1 client in this revision.<br />
requestfifo is created.<br />
It reads the request from client.<br />
A pipe is created by server.<br />
This pipe is used to send request to adder.<br />
Then, it read result(int) from adder.<br />
through pipe.<br />
It writes result to the client using resultfifo (of respectice client).<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6    locked by: root;<br />
date: 2015/12/21 06:18:23;  author: root;  state: Exp;  lines: +1 -1<br />
client_fifo data type changes from char to string.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/12/21 06:16:43;  author: root;  state: Exp;  lines: +1 -1<br />
sprintf() is used for getting RESULTFIFO name.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/12/21 06:11:34;  author: root;  state: Exp;  lines: +3 -1<br />
client_fifo is used for RESULT_FIFO.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/12/21 05:06:34;  author: root;  state: Exp;  lines: +3 -3<br />
+,-,* are replaced by &#8216;+&#8217;,&#8217;-&#8217;,&#8217;*&#8217; respectively in switch case of operation.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 05:04:10;  author: root;  state: Exp;  lines: +13 -3<br />
execl() for subtractor and multiplier are also included along with addition in a switch case which depend on operand of the request by the client.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/21 04:47:51;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: subtractor.c,v<br />
Working file: subtractor.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
It reads request from server through pipe for subtraction purpose.<br />
It processes the request and get the result.<br />
result is send to server by the pipe.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2015/12/21 04:52:26;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/client-server-communication-in-ipc-using-fifo-for-3-clients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Client Server Communication using FIFO for single server and a client when result FIFO created by client</title>
		<link>https://www.emblogic.com/blog/01/c-using-fifo-for-single-server-and-a-client-when-result-fifo-created-by-client/</link>
		<comments>https://www.emblogic.com/blog/01/c-using-fifo-for-single-server-and-a-client-when-result-fifo-created-by-client/#comments</comments>
		<pubDate>Sun, 03 Jan 2016 08:17:50 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[client-server]]></category>
		<category><![CDATA[embedded c]]></category>
		<category><![CDATA[Embedded Linux]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[FIFO]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pipes]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13114</guid>
		<description><![CDATA[Logfile of Project &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; RCS file: header.h,v Working file: header.h head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2;    selected revisions: 2 description: It contains basic header files for communication using &#8230; <a href="https://www.emblogic.com/blog/01/c-using-fifo-for-single-server-and-a-client-when-result-fifo-created-by-client/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Logfile of Project</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
RCS file: header.h,v<br />
Working file: header.h<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
root: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;    selected revisions: 2<br />
description:<br />
It contains basic header files for communication using FIFO.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2    locked by: root;<br />
date: 2015/12/20 23:20:47;  author: root;  state: Exp;  lines: +2 -2<br />
It is prevented from multiple declarations.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/20 23:18:12;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: request.h,v<br />
Working file: request.h<br />
head: 1.5<br />
branch:<br />
locks: strict<br />
root: 1.5<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 5;    selected revisions: 5<br />
description:<br />
This is format of client request.<br />
it contains client pid, operator and 2 objects(int).<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5    locked by: root;<br />
date: 2015/12/21 04:27:36;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/12/21 04:26:40;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/12/21 03:53:15;  author: root;  state: Exp;  lines: +3 -0<br />
macro REQUESTFIFO and RESULTFIFO are defined.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/21 01:32:02;  author: root;  state: Exp;  lines: +1 -1<br />
name of cpid changes to pid.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/20 23:18:41;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: adder.c,v<br />
Working file: adder.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
It is a function for adding.<br />
It reads request from server as struct request and write result to server in int format through pipe.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2015/12/21 02:02:20;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client1.c,v<br />
Working file: client1.c<br />
head: 1.22<br />
branch:<br />
locks: strict<br />
root: 1.22<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 22;    selected revisions: 22<br />
description:<br />
client open the requestfifo.<br />
client writes some text into i.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.22    locked by: root;<br />
date: 2015/12/21 04:29:45;  author: root;  state: Exp;  lines: +4 -4<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.21<br />
date: 2015/12/21 04:09:45;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.20<br />
date: 2015/12/21 04:08:24;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.19<br />
date: 2015/12/21 04:07:12;  author: root;  state: Exp;  lines: +2 -2<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.18<br />
date: 2015/12/21 03:57:01;  author: root;  state: Exp;  lines: +4 -4<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.17<br />
date: 2015/12/21 03:52:08;  author: root;  state: Exp;  lines: +6 -6<br />
requestfifo is replaced by REQUESTFIFO<br />
resultfifo is replaced by RESULTFIFO<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16<br />
date: 2015/12/21 03:17:55;  author: root;  state: Exp;  lines: +10 -1<br />
Now, client creates resultfifo.<br />
resultfifo is open in mode 666.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2015/12/21 02:52:59;  author: root;  state: Exp;  lines: +1 -1<br />
sleep time increse from 4 to 8.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2015/12/21 02:49:55;  author: root;  state: Exp;  lines: +2 -2<br />
name of requestfifo corrected to resultfifo.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2015/12/21 02:42:57;  author: root;  state: Exp;  lines: +1 -1<br />
sleep time reduced to 4 from 10.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2015/12/21 02:34:15;  author: root;  state: Exp;  lines: +2 -1<br />
sleep(10) added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2015/12/21 02:24:59;  author: root;  state: Exp;  lines: +31 -6<br />
Client reads result from server.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2015/12/21 01:33:51;  author: root;  state: Exp;  lines: +1 -1<br />
buff is removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2015/12/21 01:31:01;  author: root;  state: Exp;  lines: +13 -4<br />
Server reading request.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2015/12/21 01:12:53;  author: root;  state: Exp;  lines: +2 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/12/21 00:03:08;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/12/21 00:00:49;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/12/20 23:59:50;  author: root;  state: Exp;  lines: +2 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/12/20 23:56:41;  author: root;  state: Exp;  lines: +2 -3<br />
A character is written to FIF<br />
O.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/12/20 23:45:04;  author: root;  state: Exp;  lines: +2 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/20 23:39:19;  author: root;  state: Exp;  lines: +2 -2<br />
some print statements added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/20 23:11:52;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: server.c,v<br />
Working file: server.c<br />
head: 1.37<br />
branch:<br />
locks: strict<br />
root: 1.37<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 37;    selected revisions: 37<br />
description:<br />
Server creates requestfifo using mkfifo() function.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.37    locked by: root;<br />
date: 2015/12/21 04:29:53;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.36<br />
date: 2015/12/21 04:24:47;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.35<br />
date: 2015/12/21 04:09: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.34<br />
date: 2015/12/21 04:08:25;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.33<br />
date: 2015/12/21 04:07:16;  author: root;  state: Exp;  lines: +2 -2<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.32<br />
date: 2015/12/21 03:57:02;  author: root;  state: Exp;  lines: +6 -6<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.31<br />
date: 2015/12/21 03:52:55;  author: root;  state: Exp;  lines: +11 -11<br />
requestfifo is replaced by REQUESTFIFO<br />
&gt;&gt; resultfifo is replaced by RESULTFIFO<br />
&gt;&gt; .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.30<br />
date: 2015/12/21 03:18:28;  author: root;  state: Exp;  lines: +4 -0<br />
server write result into resultfifo.<br />
server do not create resultfifo from now.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.29<br />
date: 2015/12/21 02:55:05;  author: root;  state: Exp;  lines: +1 -1<br />
printing changes.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.28<br />
date: 2015/12/21 02:41:37;  author: root;  state: Exp;  lines: +3 -0<br />
adding print statements.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.27<br />
date: 2015/12/21 02:37:45;  author: root;  state: Exp;  lines: +1 -1<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.26<br />
date: 2015/12/21 02:34:32;  author: root;  state: Exp;  lines: +1 -1<br />
sleep(1) added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.25<br />
date: 2015/12/21 02:28:43;  author: root;  state: Exp;  lines: +1 -1<br />
Problem in passing argument to write.<br />
It is an address.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.24<br />
date: 2015/12/21 02:28:08;  author: root;  state: Exp;  lines: +2 -2<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.23<br />
date: 2015/12/21 02:27:11;  author: root;  state: Exp;  lines: +1 -1<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.22<br />
date: 2015/12/21 02:25:30;  author: root;  state: Exp;  lines: +4 -3<br />
Server writes result to client.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.21<br />
date: 2015/12/21 02:12:44;  author: root;  state: Exp;  lines: +1 -1<br />
sleep(1) is added between writing request and reading result from adder.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.20<br />
date: 2015/12/21 02:11:10;  author: root;  state: Exp;  lines: +1 -1<br />
data type of char rfd,wfd changes to char rfd[4],wfd[4]<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.19<br />
date: 2015/12/21 02:09:06;  author: root;  state: Exp;  lines: +1 -1<br />
rfd and wfd of pipe which are to be send to adder using execl .<br />
Ther data type corrected from int to char.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.18<br />
date: 2015/12/21 02:07:13;  author: root;  state: Exp;  lines: +1 -1<br />
data type of arr is corrected.<br />
arr is array of pipe.<br />
It changes from char to int.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.17<br />
date: 2015/12/21 02:03:54;  author: root;  state: Exp;  lines: +62 -11<br />
Server writes request to adder() for calculation.<br />
It creates a pipe using pipe() and execl()<br />
It reads result from adder() after calculation.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16<br />
date: 2015/12/21 01:31:12;  author: root;  state: Exp;  lines: +5 -3<br />
Server reading request and client writing request.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2015/12/21 01:14:24;  author: root;  state: Exp;  lines: +1 -1<br />
wrfifo open in read mode.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2015/12/21 01:12:55;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2015/12/21 01:07:00;  author: root;  state: Exp;  lines: +2 -2<br />
open() command given to requestfifo()<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2015/12/21 01:01:40;  author: root;  state: Exp;  lines: +1 -1<br />
sleep changes from 2 to 10.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2015/12/21 00:04:48;  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: 2015/12/21 00:03:10;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2015/12/20 23:57:01;  author: root;  state: Exp;  lines: +3 -3<br />
A character is read from fifo.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2015/12/20 23:53:41;  author: root;  state: Exp;  lines: +1 -1<br />
mode changes from 666 to 777.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/12/20 23:46:29;  author: root;  state: Exp;  lines: +1 -1<br />
mode of requestfifo is corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/12/20 23:41:16;  author: root;  state: Exp;  lines: +1 -0<br />
sleep(2) is given before read.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/12/20 23:31:17;  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: 2015/12/20 23:26:07;  author: root;  state: Exp;  lines: +2 -2<br />
Spelling mistake corrected<br />
acces changes to access()<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/12/20 23:23:11;  author: root;  state: Exp;  lines: +1 -1<br />
; mistake.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/20 23:22:31;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/20 23:12:38;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/c-using-fifo-for-single-server-and-a-client-when-result-fifo-created-by-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPC using FIFO for single server and a client when both FIFO(result and request) created by server</title>
		<link>https://www.emblogic.com/blog/01/ipc-using-fifo-for-single-server-and-a-client-when-both-fiforesult-and-request-created-by-server/</link>
		<comments>https://www.emblogic.com/blog/01/ipc-using-fifo-for-single-server-and-a-client-when-both-fiforesult-and-request-created-by-server/#comments</comments>
		<pubDate>Sat, 02 Jan 2016 08:38:32 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[client-server]]></category>
		<category><![CDATA[Embedded Linux]]></category>
		<category><![CDATA[FIFO]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pipes]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13111</guid>
		<description><![CDATA[RCS file: header.h,v Working file: header.h head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2;    selected revisions: 2 description: It contains basic header files for communication using FIFO. &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- revision 1.2    locked &#8230; <a href="https://www.emblogic.com/blog/01/ipc-using-fifo-for-single-server-and-a-client-when-both-fiforesult-and-request-created-by-server/">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 />
root: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;    selected revisions: 2<br />
description:<br />
It contains basic header files for communication using FIFO.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2    locked by: root;<br />
date: 2015/12/20 23:20:47;  author: root;  state: Exp;  lines: +2 -2<br />
It is prevented from multiple declarations.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/20 23:18:12;  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 />
root: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;    selected revisions: 2<br />
description:<br />
This is format of client request.<br />
it contains client pid, operator and 2 objects(int).<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2    locked by: root;<br />
date: 2015/12/21 01:32:02;  author: root;  state: Exp;  lines: +1 -1<br />
name of cpid changes to pid.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/20 23:18:41;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: adder.c,v<br />
Working file: adder.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
It is a function for adding.<br />
It reads request from server as struct request and write result to server in int format through pipe.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2015/12/21 02:02:20;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client1.c,v<br />
Working file: client1.c<br />
head: 1.15<br />
branch:<br />
locks: strict<br />
root: 1.15<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 15;    selected revisions: 15<br />
description:<br />
client open the requestfifo.<br />
client writes some text into i.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15    locked by: root;<br />
date: 2015/12/21 02:52:59;  author: root;  state: Exp;  lines: +1 -1<br />
sleep time increse from 4 to 8.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2015/12/21 02:49:55;  author: root;  state: Exp;  lines: +2 -2<br />
name of requestfifo corrected to resultfifo.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2015/12/21 02:42:57;  author: root;  state: Exp;  lines: +1 -1<br />
sleep time reduced to 4 from 10.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2015/12/21 02:34:15;  author: root;  state: Exp;  lines: +2 -1<br />
sleep(10) added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2015/12/21 02:24:59;  author: root;  state: Exp;  lines: +31 -6<br />
Client reads result from server.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2015/12/21 01:33:51;  author: root;  state: Exp;  lines: +1 -1<br />
buff is removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2015/12/21 01:31:01;  author: root;  state: Exp;  lines: +13 -4<br />
Server reading request.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2015/12/21 01:12:53;  author: root;  state: Exp;  lines: +2 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/12/21 00:03:08;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/12/21 00:00:49;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/12/20 23:59:50;  author: root;  state: Exp;  lines: +2 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/12/20 23:56:41;  author: root;  state: Exp;  lines: +2 -3<br />
A character is written to FIF<br />
O.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/12/20 23:45:04;  author: root;  state: Exp;  lines: +2 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/20 23:39:19;  author: root;  state: Exp;  lines: +2 -2<br />
some print statements added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/20 23:11:52;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: server.c,v<br />
Working file: server.c<br />
head: 1.29<br />
branch:<br />
locks: strict<br />
root: 1.29<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 29;    selected revisions: 29<br />
description:<br />
Server creates requestfifo using mkfifo() function.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.29    locked by: root;<br />
date: 2015/12/21 02:55:05;  author: root;  state: Exp;  lines: +1 -1<br />
printing changes.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.28<br />
date: 2015/12/21 02:41:37;  author: root;  state: Exp;  lines: +3 -0<br />
adding print statements.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.27<br />
date: 2015/12/21 02:37:45;  author: root;  state: Exp;  lines: +1 -1<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.26<br />
date: 2015/12/21 02:34:32;  author: root;  state: Exp;  lines: +1 -1<br />
sleep(1) added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.25<br />
date: 2015/12/21 02:28:43;  author: root;  state: Exp;  lines: +1 -1<br />
Problem in passing argument to write.<br />
It is an address.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.24<br />
date: 2015/12/21 02:28:08;  author: root;  state: Exp;  lines: +2 -2<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.23<br />
date: 2015/12/21 02:27:11;  author: root;  state: Exp;  lines: +1 -1<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.22<br />
date: 2015/12/21 02:25:30;  author: root;  state: Exp;  lines: +4 -3<br />
Server writes result to client.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.21<br />
date: 2015/12/21 02:12:44;  author: root;  state: Exp;  lines: +1 -1<br />
sleep(1) is added between writing request and reading result from adder.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.20<br />
date: 2015/12/21 02:11:10;  author: root;  state: Exp;  lines: +1 -1<br />
data type of char rfd,wfd changes to char rfd[4],wfd[4]<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.19<br />
date: 2015/12/21 02:09:06;  author: root;  state: Exp;  lines: +1 -1<br />
rfd and wfd of pipe which are to be send to adder using execl .<br />
Ther data type corrected from int to char.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.18<br />
date: 2015/12/21 02:07:13;  author: root;  state: Exp;  lines: +1 -1<br />
data type of arr is corrected.<br />
arr is array of pipe.<br />
It changes from char to int.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.17<br />
date: 2015/12/21 02:03:54;  author: root;  state: Exp;  lines: +62 -11<br />
Server writes request to adder() for calculation.<br />
It creates a pipe using pipe() and execl()<br />
It reads result from adder() after calculation.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16<br />
date: 2015/12/21 01:31:12;  author: root;  state: Exp;  lines: +5 -3<br />
Server reading request and client writing request.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2015/12/21 01:14:24;  author: root;  state: Exp;  lines: +1 -1<br />
wrfifo open in read mode.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2015/12/21 01:12:55;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2015/12/21 01:07:00;  author: root;  state: Exp;  lines: +2 -2<br />
open() command given to requestfifo()<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2015/12/21 01:01:40;  author: root;  state: Exp;  lines: +1 -1<br />
sleep changes from 2 to 10.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2015/12/21 00:04:48;  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: 2015/12/21 00:03:10;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2015/12/20 23:57:01;  author: root;  state: Exp;  lines: +3 -3<br />
A character is read from fifo.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2015/12/20 23:53:41;  author: root;  state: Exp;  lines: +1 -1<br />
mode changes from 666 to 777.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/12/20 23:46:29;  author: root;  state: Exp;  lines: +1 -1<br />
mode of requestfifo is corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/12/20 23:41:16;  author: root;  state: Exp;  lines: +1 -0<br />
sleep(2) is given before read.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/12/20 23:31:17;  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: 2015/12/20 23:26:07;  author: root;  state: Exp;  lines: +2 -2<br />
Spelling mistake corrected<br />
acces changes to access()<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/12/20 23:23:11;  author: root;  state: Exp;  lines: +1 -1<br />
; mistake.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/20 23:22:31;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/20 23:12:38;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/ipc-using-fifo-for-single-server-and-a-client-when-both-fiforesult-and-request-created-by-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PID, PPID and NICE value of a process</title>
		<link>https://www.emblogic.com/blog/12/pid-ppid-and-nice-value-of-a-process/</link>
		<comments>https://www.emblogic.com/blog/12/pid-ppid-and-nice-value-of-a-process/#comments</comments>
		<pubDate>Thu, 31 Dec 2015 08:32:42 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[pid]]></category>
		<category><![CDATA[ppid]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13100</guid>
		<description><![CDATA[PCB (Process Control Board) &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- Every Process has its Process Control Board(PCB) which tells about the process. PCB contains PID,PPID,PC(program counter),nice value of process. PID :- * PID is Process Identification of any process. * It is a number . &#8230; <a href="https://www.emblogic.com/blog/12/pid-ppid-and-nice-value-of-a-process/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>PCB (Process Control Board)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Every Process has its Process Control Board(PCB) which tells about the process.<br />
PCB contains PID,PPID,PC(program counter),nice value of process.<br />
PID :-<br />
* PID is Process Identification of any process.<br />
* It is a number .<br />
* Every Process has unique PID.<br />
* It generally lies between 2 to 32768.<br />
* 1 is reserved for init process (init starts at system boot &amp; it controls other processeses).<br />
* Obtaining PID of any process getpid() command is used-<br />
#include&lt;sys/types.h&gt;<br />
#include&lt;unistd.h&gt;<br />
pid_t getpid(void);<br />
PPID<br />
* PPID is Parent Process Identification.<br />
* It is also a number.<br />
* Every process has unique PPID.<br />
* It contains the PID of Process which creates this process(Parent Process).<br />
* For Orphan Process PPID is generally 1 (init process).<br />
* Obtaining PID of any process getppid() command is used-<br />
#include&lt;sys/types.h&gt;<br />
#include&lt;unistd.h&gt;<br />
pid_t getppid(void);</p>
<p>NICE value<br />
* OS determines Priority of a process using &#8220;nice&#8221; value.<br />
* Default nice value is 0.<br />
* Higher the &#8220;nice&#8221; value of a process, lesser will be  its priority.<br />
* &#8220;nice&#8221; value of a process (say PROCESS_xyz having PID PID_xyz)can be increased using command -<br />
nice PROCESS_xyz &amp; &#8211;&gt; Then it will allocate nice value to be +10.<br />
* We can adjust &#8220;nice&#8221; value using -<br />
renice 8 PID_xyz  &#8211;&gt; It will adjust nice valueof PROCESS_xyz to be +8</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/pid-ppid-and-nice-value-of-a-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPC using Pipes for single user</title>
		<link>https://www.emblogic.com/blog/12/ipc-using-pipes-for-single-user/</link>
		<comments>https://www.emblogic.com/blog/12/ipc-using-pipes-for-single-user/#comments</comments>
		<pubDate>Wed, 30 Dec 2015 07:32:08 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Embedded Linux]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[ipc pipes]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pipes]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13097</guid>
		<description><![CDATA[RCS file: header.h,v Working file: header.h head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2;    selected revisions: 2 description: stdio.h , fcntl.h, unistd.h, sys/types.h are included. &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- revision 1.2    locked by: root; &#8230; <a href="https://www.emblogic.com/blog/12/ipc-using-pipes-for-single-user/">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 />
root: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;    selected revisions: 2<br />
description:<br />
stdio.h , fcntl.h, unistd.h, sys/types.h are included.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2    locked by: root;<br />
date: 2015/12/20 20:30:34;  author: root;  state: Exp;  lines: +0 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/20 20:01:44;  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 />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
It contains structure of request.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2015/12/20 20:01:44;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: adder.c,v<br />
Working file: adder.c<br />
head: 1.4<br />
branch:<br />
locks: strict<br />
root: 1.4<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 4;    selected revisions: 4<br />
description:<br />
A function for adding obj1 and obj2 which is contained in request received.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4    locked by: root;<br />
date: 2015/12/20 21:52:27;  author: root;  state: Exp;  lines: +4 -4<br />
Printing changes.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/12/20 21:32:16;  author: root;  state: Exp;  lines: +1 -0<br />
Printing mistake corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/20 21:22:32;  author: root;  state: Exp;  lines: +12 -4<br />
Result is sent to server.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/20 21:06:23;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client1.c,v<br />
Working file: client1.c<br />
head: 1.13<br />
branch:<br />
locks: strict<br />
root: 1.13<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 13;    selected revisions: 13<br />
description:<br />
request.h , stdio.h, fcntl.h included.<br />
argc has 3 arguments<br />
argv has rfdp,wfdp.<br />
Client writes the message.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13    locked by: root;<br />
date: 2015/12/20 21:52:27;  author: root;  state: Exp;  lines: +9 -12<br />
Printing Changes<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2015/12/20 21:46:04;  author: root;  state: Exp;  lines: +2 -2<br />
obj1 and obj2 value changes<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2015/12/20 21:43:02;  author: root;  state: Exp;  lines: +1 -1<br />
Printing change.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2015/12/20 21:41:10;  author: root;  state: Exp;  lines: +13 -2<br />
Client reading result from server<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2015/12/20 20:50:38;  author: root;  state: Exp;  lines: +1 -1<br />
Request printed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2015/12/20 20:48:04;  author: root;  state: Exp;  lines: +1 -1<br />
Request sent<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/12/20 20:41:57;  author: root;  state: Exp;  lines: +1 -1<br />
argv changed to argv[]<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/12/20 20:40:43;  author: root;  state: Exp;  lines: +5 -5<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/12/20 20:38:04;  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: 2015/12/20 20:33:54;  author: root;  state: Exp;  lines: +1 -2<br />
Debugging<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/12/20 20:32:04;  author: root;  state: Exp;  lines: +2 -1<br />
argc is printed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/20 20:27:40;  author: root;  state: Exp;  lines: +1 -0<br />
print statement at starting is added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/12/20 19:55:46;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client2.c,v<br />
Working file: client2.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
It requests for subtration from server.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2015/12/20 22:11:46;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: client3.c,v<br />
Working file: client3.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
It is function for multiplication.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2015/12/20 22:29:00;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: multiplier.c,v<br />
Working file: multiplier.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
Function for multiplier<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2015/12/20 22:09:30;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: server.c,v<br />
Working file: server.c<br />
head: 1.29<br />
branch:<br />
locks: strict<br />
root: 1.29<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 29;    selected revisions: 29<br />
description:<br />
Server includes header.h,request.h<br />
server creates a pipe(Half duplex)<br />
Server then creates a child.<br />
child is replaced by client.<br />
When pipe(arr) is called , arr[0] has read file descriptor and arr[1]<br />
has write file descriptor.<br />
rfdp and wfdp are passed to child.<br />
server reads the  data written by pipe.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.29    locked by: root;<br />
date: 2015/12/20 22:21:29;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.28<br />
date: 2015/12/20 22:19:00;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.27<br />
date: 2015/12/20 22:16:05;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.26<br />
date: 2015/12/20 22:14:36;  author: root;  state: Exp;  lines: +1 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.25<br />
date: 2015/12/20 22:07:12;  author: root;  state: Exp;  lines: +18 -2<br />
Subtractor and multiplier and adder are available operations.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.24<br />
date: 2015/12/20 21:56:07;  author: root;  state: Exp;  lines: +2 -2<br />
Printing changes.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.23<br />
date: 2015/12/20 21:54:17;  author: root;  state: Exp;  lines: +2 -2<br />
Printing changes.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.22<br />
date: 2015/12/20 21:44:51;  author: root;  state: Exp;  lines: +3 -3<br />
Printing change<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.21<br />
date: 2015/12/20 21:42:22;  author: root;  state: Exp;  lines: +2 -2<br />
count4 declared.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.20<br />
date: 2015/12/20 21:41:10;  author: root;  state: Exp;  lines: +12 -2<br />
Server writing result to client.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.19<br />
date: 2015/12/20 21:32:16;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.18<br />
date: 2015/12/20 21:30:26;  author: root;  state: Exp;  lines: +12 -5<br />
server read the result and print it.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.17<br />
date: 2015/12/20 21:16:59;  author: root;  state: Exp;  lines: +2 -2<br />
logical error<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16<br />
date: 2015/12/20 21:12:16;  author: root;  state: Exp;  lines: +1 -0<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2015/12/20 21:07:57;  author: root;  state: Exp;  lines: +1 -1<br />
fret2 is declared.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2015/12/20 21:06:23;  author: root;  state: Exp;  lines: +35 -5<br />
adder is callled using another pipe and fork.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2015/12/20 20:52: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.12<br />
date: 2015/12/20 20:51: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.11<br />
date: 2015/12/20 20:50:38;  author: root;  state: Exp;  lines: +1 -1<br />
Request printed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2015/12/20 20:48:04;  author: root;  state: Exp;  lines: +1 -1<br />
Request received.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2015/12/20 20:44:58;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2015/12/20 20:29:14;  author: root;  state: Exp;  lines: +2 -1<br />
ret=wait()<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/12/20 20:27:40;  author: root;  state: Exp;  lines: +2 -1<br />
print statement at starting is added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/12/20 20:24:08;  author: root;  state: Exp;  lines: +1 -1<br />
client1 is replaced by client (name change in execl).<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/12/20 20:22:45;  author: root;  state: Exp;  lines: +4 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/12/20 20:20:38;  author: root;  state: Exp;  lines: +1 -1<br />
Pipe is created before fork.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/12/20 20:19:46;  author: root;  state: Exp;  lines: +4 -2<br />
Some print statements added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/12/20 20:16:56;  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: 2015/12/20 19:55:46;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: subtractor.c,v<br />
Working file: subtractor.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
Function for subtraction.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2015/12/20 22:09:30;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/ipc-using-pipes-for-single-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project 03: Client Server implementation using PIPES</title>
		<link>https://www.emblogic.com/blog/03/project-03-client-server-implementation-using-pipes/</link>
		<comments>https://www.emblogic.com/blog/03/project-03-client-server-implementation-using-pipes/#comments</comments>
		<pubDate>Thu, 05 Mar 2015 00:21:20 +0000</pubDate>
		<dc:creator><![CDATA[Parampreet Singh]]></dc:creator>
				<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[ipc pipes]]></category>
		<category><![CDATA[pipes]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=12408</guid>
		<description><![CDATA[Here i have used 3 requesting clients and 3 processing clients. RCS file: header1.h,v Working file: header1.h head: branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 0 description: this is the header file.it contains library which &#8230; <a href="https://www.emblogic.com/blog/03/project-03-client-server-implementation-using-pipes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><em><strong>Here i have used 3 requesting clients and 3 processing clients.</strong></em><br />
RCS file: header1.h,v<br />
Working file: header1.h<br />
head:<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 0<br />
description:<br />
this is the header file.it contains library which are required by programs<br />
contains prototype for functions and structures<br />
=============================================================================<br />
RCS file: server.c,v<br />
Working file: server.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1; selected revisions: 1<br />
description:<br />
this is the server program..here i have created six pipes.<br />
3 each for requesting clients and 3 for processing clients<br />
requesting client will send request to the server and server then transfer the info to the processing clients<br />
processing clients will process that info and send back to the server<br />
server will then transfer the info back to the requesting clients<br />
i have implemented the server program using functions<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1 locked by: root;<br />
date: 2015/03/05 00:08:19; 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 />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1; selected revisions: 1<br />
description:<br />
this is the first requesting client.<br />
Sending request for the addtion.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1 locked by: root;<br />
date: 2015/03/05 00:08:11; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: request_client_mul.c,v<br />
Working file: request_client_mul.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1; selected revisions: 1<br />
description:<br />
this is second requesting client<br />
sending request for the multiplication.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1 locked by: root;<br />
date: 2015/03/05 00:08:19; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: request_client_sub.c,v<br />
Working file: request_client_sub.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1; selected revisions: 1<br />
description:<br />
this is the third requesting client<br />
sending request for the subtraction<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1 locked by: root;<br />
date: 2015/03/05 00:08:19; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: adder.c,v<br />
Working file: adder.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1; selected revisions: 1<br />
description:<br />
this is first processing client<br />
here arithmetic operation&#8221;ADDITION&#8221; is performed<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1 locked by: root;<br />
date: 2015/03/05 00:08:19; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: mul.c,v<br />
Working file: mul.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1; selected revisions: 1<br />
description:<br />
this is the second processing client<br />
here arithmetic operation &#8220;MULTIPLICATION&#8221; is performed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1 locked by: root;<br />
date: 2015/03/05 00:08:19; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: sub.c,v<br />
Working file: sub.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1; selected revisions: 1<br />
description:<br />
this is the third processing client.<br />
Here arithmetic operation “SUBTRACTION” is performed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1 locked by: root;<br />
date: 2015/03/05 00:08:19; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/project-03-client-server-implementation-using-pipes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>client,server and process communication via pipes</title>
		<link>https://www.emblogic.com/blog/09/clientserver-and-process-communication-via-pipes/</link>
		<comments>https://www.emblogic.com/blog/09/clientserver-and-process-communication-via-pipes/#comments</comments>
		<pubDate>Wed, 24 Sep 2014 14:33:41 +0000</pubDate>
		<dc:creator><![CDATA[Joon Vichitra]]></dc:creator>
				<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[client-server]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[pipe]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=11525</guid>
		<description><![CDATA[RCS file: RCS/server.c,v Working file: server.c head: 1.8 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 8;    selected revisions: 8 description: program which act as a server to take the request of client done:created one child &#8230; <a href="https://www.emblogic.com/blog/09/clientserver-and-process-communication-via-pipes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>RCS file: RCS/server.c,v<br />
Working file: server.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 />
program which act as a server to take the request of client<br />
done:created one child process and a pipe<br />
done:replace the child process with client1.c and send pfd[1] to the client as a command line argument<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2014/09/24 14:24:48;  author: root;  state: Exp;  lines: +0 -1<br />
change the o/p appearence<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2014/09/24 14:12:17;  author: root;  state: Exp;  lines: +42 -10<br />
read result from p1,p2,p3<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2014/09/24 13:08:55;  author: root;  state: Exp;  lines: +17 -3<br />
create one more child process to call process1.c<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2014/09/24 09:47:40;  author: root;  state: Exp;  lines: +31 -3<br />
read the data from all three client<br />
do switch case to perform different operation<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2014/09/24 08:38:36;  author: root;  state: Exp;  lines: +6 -6<br />
create 3 child of same parent to call diff-2 client<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2014/09/24 08:14:31;  author: root;  state: Exp;  lines: +18 -7<br />
crate another pipe for communication between server and process<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2014/09/24 06:39:04;  author: root;  state: Exp;  lines: +3 -0<br />
read the data through pipe sent by client1<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2014/09/24 06:22:18;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: RCS/client1.c,v<br />
Working file: client1.c<br />
head: 1.5<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 5;    selected revisions: 5<br />
description:<br />
client process which will replace the child process<br />
done:create the structure for operand and operation, get the pipe write fd as a command line argument<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2014/09/24 14:25:10;  author: root;  state: Exp;  lines: +0 -2<br />
change the o/p appearance<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2014/09/24 09:48:23;  author: root;  state: Exp;  lines: +6 -11<br />
write operater and two operand into pipe<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2014/09/24 08:15:04;  author: root;  state: Exp;  lines: +3 -1<br />
send the data to server and exit()<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2014/09/24 06:39:32;  author: root;  state: Exp;  lines: +5 -1<br />
write the data into pipe so that server can read that<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2014/09/24 06:24:50;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: RCS/client2.c,v<br />
Working file: client2.c<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
root: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;    selected revisions: 2<br />
description:<br />
create client 2 to do the different mathematical operation<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2    locked by: root;<br />
date: 2014/09/24 09:48:57;  author: root;  state: Exp;  lines: +7 -15<br />
write into pipe<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2014/09/24 08:39:12;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: RCS/client3.c,v<br />
Working file: client3.c<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 />
create client 3<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2014/09/24 14:25:40;  author: root;  state: Exp;  lines: +0 -2<br />
change the o/p appearance<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2014/09/24 09:49:23;  author: root;  state: Exp;  lines: +6 -13<br />
whrite into pipe<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2014/09/24 08:39:54;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: RCS/process1.c,v<br />
Working file: process1.c<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 />
this is process program which do the operation on data and return the result<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2014/09/24 14:25:49;  author: root;  state: Exp;  lines: +0 -2<br />
change the o/p appearance<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2014/09/24 14:13:02;  author: root;  state: Exp;  lines: +8 -3<br />
write the result into pipe in interger form<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2014/09/24 13:09:17;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: RCS/process2.c,v<br />
Working file: process2.c<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 />
process to perform &#8211; operation and writing the result back into the pipe<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2014/09/24 14:25:52;  author: root;  state: Exp;  lines: +0 -2<br />
change the o/p appearance<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2014/09/24 14:14:17;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: RCS/process3.c,v<br />
Working file: process3.c<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 />
process 3 to perform multiplication<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2014/09/24 14:25:55;  author: root;  state: Exp;  lines: +0 -2<br />
change the o/p appearance<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2014/09/24 14:14:52;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/09/clientserver-and-process-communication-via-pipes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>process replacement followed by inter process comm. using file</title>
		<link>https://www.emblogic.com/blog/09/process-replacement-followed-by-inter-process-comm-using-file/</link>
		<comments>https://www.emblogic.com/blog/09/process-replacement-followed-by-inter-process-comm-using-file/#comments</comments>
		<pubDate>Mon, 22 Sep 2014 13:17:41 +0000</pubDate>
		<dc:creator><![CDATA[Joon Vichitra]]></dc:creator>
				<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[execl]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[ipc]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=11516</guid>
		<description><![CDATA[This is the output: [root@localhost ipc]# ./p_comm File Open Successfully This is Parent with id=31340 This is child with id=31341 This is a new program which replaced the child Write By Child:: Success Read by Parent: Success     Child Said:Hello &#8230; <a href="https://www.emblogic.com/blog/09/process-replacement-followed-by-inter-process-comm-using-file/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><strong>This is the output:</strong></p>
<p><strong>[root@localhost ipc]# ./p_comm </strong><br />
<strong>File Open Successfully</strong><br />
<strong>This is Parent with id=31340</strong><br />
<strong>This is child with id=31341</strong><br />
<strong>This is a new program which replaced the child</strong><br />
<strong>Write By Child:: Success</strong><br />
<strong>Read by Parent: Success</strong><br />
<strong>    Child Said:Hello Parent</strong><br />
<strong>Write by Parent: Success</strong><br />
<strong>Read By Child:: Success</strong><br />
<strong>    Parent said:Hi Child How are you?</strong><br />
<strong>Write By Child:: Success</strong><br />
<strong>Read by Parent: Success</strong><br />
<strong>    Child Said:I am Fine. U Tell?</strong><br />
<strong>Write by Parent: Success</strong><br />
<strong>Read By Child:: Success</strong><br />
<strong>    Parent said:We are also fine.Ok Bye</strong><br />
<strong>Child exit successfully and code is 0</strong></p>
<p>Log File</p>
<p>RCS file: RCS/p_comm.c,v<br />
Working file: p_comm.c<br />
head: 1.4<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 4;    selected revisions: 4<br />
description:<br />
program to communicate between two process through a file<br />
done- opening a file in rdwr mode<br />
convert int fd into string to make compatiple with execl argument<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2014/09/22 12:46:24;  author: root;  state: Exp;  lines: +13 -3<br />
done:both read and write by parent in the same file<br />
Note: Before executing this program make sure that &#8220;child_comm.c&#8221; file must be in the same directory<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2014/09/22 12:10:56;  author: root;  state: Exp;  lines: +9 -4<br />
1st read by the parent and then reply back to child by writing into the same file<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2014/09/22 11:53:56;  author: root;  state: Exp;  lines: +10 -4<br />
read the message written by child in a file<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2014/09/22 11:23:57;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: RCS/child_comm.c,v<br />
Working file: child_comm.c<br />
head: 1.4<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 4;    selected revisions: 4<br />
description:<br />
program which will replace the child to do inter process comm through file<br />
get fd through argv[0] and than convert into integer using atoi<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2014/09/22 12:48:25;  author: root;  state: Exp;  lines: +12 -2<br />
done:child repalace itself with this file using execl and this program then communicate with parent<br />
note:this program is linked with p_comm.c<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2014/09/22 12:11:48;  author: root;  state: Exp;  lines: +9 -2<br />
1st write the msg for parent and then read the msg from parent using the same file<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2014/09/22 11:40:06;  author: root;  state: Exp;  lines: +4 -3<br />
got message which is to be written in file through argv[1]<br />
write the message into file<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2014/09/22 11:32:27;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/09/process-replacement-followed-by-inter-process-comm-using-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
