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
What does Verification represent? Verification shows the set of activities that are carried out to confirm that the software correctly executes the specific functionality.

What is a file? A named collection of related data explained by the creator, recorded on secondary storage.

Gopher Gallery consists of a shopping mall and a cart ride that covers  the 150 acre habitat. There are m visitors and n single-person vehicles. Visitors  stroll around the mall at

Consider the subsequent resource-allocation policy. Requests as well as releases for resources are allowed at any time. If a request for resources can't be satisfied because the re

describe main points of multiuser and multi tasking operating systems.

Q. What are three benefits of dynamic (shared) linkage of libraries compared to static linkage? What are two situations where static linkage is preferable? Answer: The

How can the deadlock be prevented-Safe State Safe state : A state is safe if the system is able to allocate resources to each process in some order and still avoid deadlock.

What is the kernel? A more common explanation is that the OS is the one program running at all times on the computer  usually known as the kernel, with all else being applicati

how to differentiate scheduling algorithms?

Developing Code with Threads Writing code to support a thread-based implementation is very straightforward. Simple APIs are presented to the developer for each threads package.