Parent and child process communicate in unix, Operating System

Parent and Child process communicate in unix

A child and parent can interact through any of the normal inter-process communication schemes (pipes, message queues, sockets, shared memory), but also have some special paths to interact that take advantage of their relationship as a child and parent. 

One of the most general is that the parent may act the exit status of the child.  Since the child adds file descriptors from its parent, the parent may start both ends of a fork, pipe, then the parent close one part and the child close the other part of the pipe. This is what occurs when you call the popen() routine to execute another program from within yours, i.e. you may write to the file descriptor given from popen() and the child process looks it as its stdin, or you may read from the file descriptor and look what the program wrote to its stdout. 

 

106_parent child process communication.png

Posted Date: 7/28/2012 8:30:44 AM | Location : United States







Related Discussions:- Parent and child process communicate in unix, Assignment Help, Ask Question on Parent and child process communicate in unix, Get Answer, Expert's Help, Parent and child process communicate in unix Discussions

Write discussion on Parent and child process communicate in unix
Your posts are moderated
Related Questions
Explain what ISAM is. Indexed sequential access method. The file is stored in sorted order. ISAM has a master index file, indicating in what part of another index file the key

Q. What are the reasons for process suspension? Reasons for process suspension 1.  Swapping 2.  Timing 3.  Interactive user request 4.  Parent process request


The question of fairness, regarding page eviction, is a hard one. How do we decide what is fair? Many operating systems use global LRU, where pages from all processes are managed t

Explain a boot control block A boot control block can have the information required by the system to boot an operating from that partition. If the disk does not have an operati

How File record length should be chosen File record length should be selected to match the data characteristics


Interval among the time of submission and completion of the job is known as                    Interval among the time of submission and completion of the job is known as Turn

Question: a) Define the term ‘Operating System' and identify two goals of an operating system. b) What do you understand by Symmetric multiprocessing (SMP) and Asymmetr

write a linux command to display lines from 25 - 45 of directory "/edc/password"