<?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; file</title>
	<atom:link href="https://www.emblogic.com/blog/tag/file/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>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>
