EmbLogic's Blog

Implementation of execl() and fork() for writing into textfile from the child process

RCS file: replacing.c,v
Working file: replacing.c
head: 1.3
branch:
locks: strict
root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;    selected revisions: 3
description:
i this we have used fork().
—————————-
revision 1.3    locked by: root;
date: 2015/02/26 10:37:03;  author: root;  state: Exp;  lines: +8 -3
now ew have passed fd by execl()
fd was of type int and is converted to char by sprintf to make it compatible with execl()
—————————-
revision 1.2
date: 2015/02/26 09:30:29;  author: root;  state: Exp;  lines: +12 -2
opening a textfile.
invoking execl() inside child process.
—————————-
revision 1.1
date: 2015/02/26 09:05:24;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: new.c,v
Working file: new.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;    selected revisions: 2
description:
just given printf statement for printing the statement
—————————-
revision 1.2    locked by: root;
date: 2015/02/26 10:39:35;  author: root;  state: Exp;  lines: +11 -1
Firstly fd is convert back to int using atoi
then we are writting a string into textfile .
—————————-
revision 1.1
date: 2015/02/26 09:38:30;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;    selected revisions: 2
description:
included stdio.h,unistd.h,stdlib.h.
—————————-
revision 1.2
date: 2015/02/26 09:33:12;  author: root;  state: Exp;  lines: +1 -1
included fcntl.h
—————————-
revision 1.1
date: 2015/02/26 09:07:30;  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>