EmbLogic's Blog

Client,server and process communication project using signals

Welcome to the Project!!
n1=12, n2=23 Performing addition action
In Server:Sum=35
In CLIENT: Result=35
n1=20, n2=8 Performing Subtraction action
In Server:Sub=12
In CLIENT2: Result=12
n1=5, n2=8 Performing Multiplication action
In Server:Mul=40
In CLIENT3: Result=40

RCS file: RCS/server.c,v
Working file: server.c
head: 1.27
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 27;    selected revisions: 27
description:
program which act as a server to take the request of client
done:created one child process and a pipe
done:replace the child process with client1.c and send pfd[1] to the client as a command line argument
—————————-
revision 1.27
date: 2014/09/27 13:32:08;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.26
date: 2014/09/27 13:30:56;  author: root;  state: Exp;  lines: +1 -1
fix child exit normally
—————————-
revision 1.25
date: 2014/09/27 13:26:47;  author: root;  state: Exp;  lines: +5 -11
remove extra printf
—————————-
revision 1.24
date: 2014/09/27 13:20:47;  author: root;  state: Exp;  lines: +19 -6
create 3rd client and process to perform multiplication
—————————-
revision 1.23
date: 2014/09/27 13:07:11;  author: root;  state: Exp;  lines: +2 -2
include client 2 also
—————————-
revision 1.22
date: 2014/09/27 12:59:47;  author: root;  state: Exp;  lines: +1 -1
send signal to client after reading the result from process pipe and writing the same into client pipe
—————————-
revision 1.21
date: 2014/09/27 12:54:04;  author: root;  state: Exp;  lines: +4 -2
get the pid of child in parent process inorder to send the signal using kill
—————————-
revision 1.20
date: 2014/09/27 12:48:34;  author: root;  state: Exp;  lines: +7 -6
get the id of process child into pid1
—————————-
revision 1.19
date: 2014/09/27 05:37:45;  author: root;  state: Exp;  lines: +1 -0
check char variable in switch case
—————————-
revision 1.18
date: 2014/09/27 05:34:19;  author: root;  state: Exp;  lines: +1 -2
*** empty log message ***
—————————-
revision 1.17
date: 2014/09/27 05:27:32;  author: root;  state: Exp;  lines: +1 -1
change the position of signal handler
—————————-
revision 1.16
date: 2014/09/27 05:25:13;  author: root;  state: Exp;  lines: +1 -1
use pause to synchronise
—————————-
revision 1.15
date: 2014/09/27 05:18:07;  author: root;  state: Exp;  lines: +2 -2
change the lable1 in front of fork
—————————-
revision 1.14
date: 2014/09/27 05:12:04;  author: root;  state: Exp;  lines: +21 -3
create 1 client and 1 process for subtraction operation
—————————-
revision 1.13
date: 2014/09/26 19:00:34;  author: root;  state: Exp;  lines: +0 -1
*** empty log message ***
—————————-
revision 1.12
date: 2014/09/26 18:55:32;  author: root;  state: Exp;  lines: +2 -0
write the result into client pipe
—————————-
revision 1.11
date: 2014/09/26 18:51:04;  author: root;  state: Exp;  lines: +5 -1
define function to handle sigusr1
—————————-
revision 1.10
date: 2014/09/26 18:46:22;  author: root;  state: Exp;  lines: +2 -2
use pause()
—————————-
revision 1.9
date: 2014/09/26 17:57:33;  author: root;  state: Exp;  lines: +30 -86
remake the program without using any sleep instruction
use structure to read the data from client
write the num1 and num2 into process adder pipe
—————————-
revision 1.8
date: 2014/09/24 14:24:48;  author: root;  state: Exp;  lines: +0 -1
change the o/p appearence
—————————-
revision 1.7
date: 2014/09/24 14:12:17;  author: root;  state: Exp;  lines: +42 -10
read result from p1,p2,p3
—————————-
revision 1.6
date: 2014/09/24 13:08:55;  author: root;  state: Exp;  lines: +17 -3
create one more child process to call process1.c
—————————-
revision 1.5
date: 2014/09/24 09:47:40;  author: root;  state: Exp;  lines: +31 -3
read the data from all three client
do switch case to perform different operation
—————————-
revision 1.4
date: 2014/09/24 08:38:36;  author: root;  state: Exp;  lines: +6 -6
create 3 child of same parent to call diff-2 client
—————————-
revision 1.3
date: 2014/09/24 08:14:31;  author: root;  state: Exp;  lines: +18 -7
crate another pipe for communication between server and process
—————————-
revision 1.2
date: 2014/09/24 06:39:04;  author: root;  state: Exp;  lines: +3 -0
read the data through pipe sent by client1
—————————-
revision 1.1
date: 2014/09/24 06:22:18;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/client1.c,v
Working file: client1.c
head: 1.15
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 15;    selected revisions: 15
description:
client process which will replace the child process
done:create the structure for operand and operation, get the pipe write fd as a command line argument
—————————-
revision 1.15
date: 2014/09/27 13:21:15;  author: root;  state: Exp;  lines: +0 -2
remove unwanted printf
—————————-
revision 1.14
date: 2014/09/27 13:07:36;  author: root;  state: Exp;  lines: +1 -1
don’t work  by ignoring so get back on handling the SIGUSR1
—————————-
revision 1.13
date: 2014/09/27 13:03:41;  author: root;  state: Exp;  lines: +1 -2
test on signal ignore
—————————-
revision 1.12
date: 2014/09/27 13:00:28;  author: root;  state: Exp;  lines: +6 -1
define the signal handler and use pause till the client get the result after writing the data into pipe
—————————-
revision 1.11
date: 2014/09/27 12:54:35;  author: root;  state: Exp;  lines: +1 -0
get pid of itself
—————————-
revision 1.10
date: 2014/09/27 05:34:35;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
—————————-
revision 1.9
date: 2014/09/27 05:25:49;  author: root;  state: Exp;  lines: +1 -0
send signal to parent using kill
—————————-
revision 1.8
date: 2014/09/26 18:55:49;  author: root;  state: Exp;  lines: +2 -1
read the result from the server end
—————————-
revision 1.7
date: 2014/09/26 18:46:32;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.6
date: 2014/09/26 17:59:29;  author: root;  state: Exp;  lines: +15 -8
use structure to write the data into pipe
—————————-
revision 1.5
date: 2014/09/24 14:25:10;  author: root;  state: Exp;  lines: +0 -2
change the o/p appearance
—————————-
revision 1.4
date: 2014/09/24 09:48:23;  author: root;  state: Exp;  lines: +6 -11
write operater and two operand into pipe
—————————-
revision 1.3
date: 2014/09/24 08:15:04;  author: root;  state: Exp;  lines: +3 -1
send the data to server and exit()
—————————-
revision 1.2
date: 2014/09/24 06:39:32;  author: root;  state: Exp;  lines: +5 -1
write the data into pipe so that server can read that
—————————-
revision 1.1
date: 2014/09/24 06:24:50;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/client2.c,v
Working file: client2.c
head: 1.10
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 10;    selected revisions: 10
description:
create client 2 to do the different mathematical operation
—————————-
revision 1.10
date: 2014/09/27 13:21:39;  author: root;  state: Exp;  lines: +1 -4
remove unwanted printf
—————————-
revision 1.9
date: 2014/09/27 13:10:11;  author: root;  state: Exp;  lines: +3 -1
remove syntex error
—————————-
revision 1.8
date: 2014/09/27 13:08:14;  author: root;  state: Exp;  lines: +3 -1
write the signal handler
—————————-
revision 1.7
date: 2014/09/27 12:49:18;  author: root;  state: Exp;  lines: +1 -0
use signal
—————————-
revision 1.6
date: 2014/09/27 05:34:37;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
—————————-
revision 1.5
date: 2014/09/27 05:26:00;  author: root;  state: Exp;  lines: +2 -1
send signal SIGUSR1 to server
—————————-
revision 1.4
date: 2014/09/27 05:12:30;  author: root;  state: Exp;  lines: +19 -8
client for subtraction
—————————-
revision 1.3
date: 2014/09/24 16:13:23;  author: root;  state: Exp;  lines: +0 -2
*** empty log message ***
—————————-
revision 1.2
date: 2014/09/24 09:48:57;  author: root;  state: Exp;  lines: +7 -15
write into pipe
—————————-
revision 1.1
date: 2014/09/24 08:39:12;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/client3.c,v
Working file: client3.c
head: 1.4
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;    selected revisions: 4
description:
create client 3
—————————-
revision 1.4
date: 2014/09/27 13:21:49;  author: root;  state: Exp;  lines: +21 -7
create client for multiplication with signal handler after writing the data
—————————-
revision 1.3
date: 2014/09/24 14:25:40;  author: root;  state: Exp;  lines: +0 -2
change the o/p appearance
—————————-
revision 1.2
date: 2014/09/24 09:49:23;  author: root;  state: Exp;  lines: +6 -13
whrite into pipe
—————————-
revision 1.1
date: 2014/09/24 08:39:54;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/process1.c,v
Working file: process1.c
head: 1.6
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 6;    selected revisions: 6
description:
this is process program which do the operation on data and return the result
—————————-
revision 1.6
date: 2014/09/27 13:26:59;  author: root;  state: Exp;  lines: +0 -1
remove extra printf
—————————-
revision 1.5
date: 2014/09/26 18:46:37;  author: root;  state: Exp;  lines: +2 -0
send signal using kill
—————————-
revision 1.4
date: 2014/09/26 17:59:53;  author: root;  state: Exp;  lines: +6 -16
get the num1 and num2 from server and perform the addition operation
wrirte back the sum into pipe
—————————-
revision 1.3
date: 2014/09/24 14:25:49;  author: root;  state: Exp;  lines: +0 -2
change the o/p appearance
—————————-
revision 1.2
date: 2014/09/24 14:13:02;  author: root;  state: Exp;  lines: +8 -3
write the result into pipe in interger form
—————————-
revision 1.1
date: 2014/09/24 13:09:17;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/process2.c,v
Working file: process2.c
head: 1.5
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 5;    selected revisions: 5
description:
process to perform – operation and writing the result back into the pipe
—————————-
revision 1.5
date: 2014/09/27 13:27:12;  author: root;  state: Exp;  lines: +0 -1
remove extra printf
—————————-
revision 1.4
date: 2014/09/27 05:13:57;  author: root;  state: Exp;  lines: +1 -1
use sub instead of sum
—————————-
revision 1.3
date: 2014/09/27 05:12:41;  author: root;  state: Exp;  lines: +7 -15
processing end for subtraction
—————————-
revision 1.2
date: 2014/09/24 14:25:52;  author: root;  state: Exp;  lines: +0 -2
change the o/p appearance
—————————-
revision 1.1
date: 2014/09/24 14:14:17;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/process3.c,v
Working file: process3.c
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;    selected revisions: 3
description:
process 3 to perform multiplication
—————————-
revision 1.3
date: 2014/09/27 13:22:13;  author: root;  state: Exp;  lines: +7 -16
process 3 for multiplication
—————————-
revision 1.2
date: 2014/09/24 14:25:55;  author: root;  state: Exp;  lines: +0 -2
change the o/p appearance
—————————-
revision 1.1
date: 2014/09/24 14:14:52;  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>