Write a program to creates two childs by using send –pipe and receive –pipe primitives.Each child Process reads from a different serial line and sends the character read back to parent process through a pie. The parent process outputs all characters received. A child terminates when exclamation point character is received.The parent process terminates after both children have terminate.
+1
A:
For Windows, you can try looking at CreateProcess, paying special attention to the bInheritHandles
parameter and the hStdInput
and hStdOutput
members of the STARTUPINFO struct.
George Edison
2010-03-24 05:45:12
+1
A:
Since it is a homework question, I would like to give only pointers what all you need to know to complete this in Linux : 1) Process Creation system call (fork) 2) Pipe Creation system call (pipe). Also read the theory about how the pipes are read to and written from.
With some basic understanding of these two things, you should be able to complete your assignment.
Furquan
2010-03-24 06:41:40