EmbLogic's Blog

Interprocess communication using files (passing fd)…

 

RCS file: new.c,v
Working file: new.c
head: 1.5
branch:
locks: strict
	root: 1.5
access list:
symbolic names:
keyword substitution: kv
total revisions: 5;	selected revisions: 5
description:
It is another process to which initial process will communicate
----------------------------
revision 1.5	locked by: root;
date: 2015/03/01 02:36:21;  author: root;  state: Exp;  lines: +1 -1
; is added
----------------------------
revision 1.4
date: 2015/03/01 02:34:13;  author: root;  state: Exp;  lines: +13 -0
Here the fd is collected using the command line arguments 
The fd is again converted into integer value using atoi()
----------------------------
revision 1.3
date: 2015/03/01 02:26:06;  author: root;  state: Exp;  lines: +1 -1
arguments passed from execl are now collected here using command line arguments in main()
----------------------------
revision 1.2
date: 2015/03/01 02:20:29;  author: root;  state: Exp;  lines: +1 -0
just printed the hello all.
----------------------------
revision 1.1
date: 2015/03/01 02:16:51;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: replacing.c,v
Working file: replacing.c
head: 1.6
branch:
locks: strict
	root: 1.6
access list:
symbolic names:
keyword substitution: kv
total revisions: 6;	selected revisions: 6
description:
It is a initial process which uses execl to communicate with the another process
----------------------------
revision 1.6	locked by: root;
date: 2015/03/01 02:35:40;  author: root;  state: Exp;  lines: +1 -0
<fcntl.h> is used for opening file
----------------------------
revision 1.5
date: 2015/03/01 02:32:35;  author: root;  state: Exp;  lines: +9 -2
Now i have opened a file whose file descriptor is passed as a second argument in execl
But before passing fd is converted into a string using sprintf()
----------------------------
revision 1.4
date: 2015/03/01 02:23:15;  author: root;  state: Exp;  lines: +2 -0
child process is killed using execl and the new process is created now which will communicate with the another process
The process created will use the PID of the child process. 
----------------------------
revision 1.3
date: 2015/03/01 02:21:19;  author: root;  state: Exp;  lines: +2 -2
changed the cases in switch statements
----------------------------
revision 1.2
date: 2015/03/01 02:19:43;  author: root;  state: Exp;  lines: +18 -1
created a child process using fork()
----------------------------
revision 1.1
date: 2015/03/01 02:16:51;  author: root;  state: Exp;
Initial revision
=============================================================================

 

Leave a Reply

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

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