How can a parent and child process communicate?

Answers were Sorted based on User's Feedback



How can a parent and child process communicate?..

Answer / yogesh warad

Parent and child processes can communicate with unnamed pipe,
but the pipe should be created before creating the
child(i.e. forking).
After forking the process, child process inherits all
properties of parent, hence pipe also. This pipe can ce used
to communicate between parent and child process. But if one
wants to use exec(s), then this technique is not useful. The
user have to use named pipe or Message-Queue.



Is This Answer Correct ?    35 Yes 7 No

How can a parent and child process communicate?..

Answer / basha

this is called copy on write concept
===================================
when ever an environment variable is modified for the
first time either by the parent process or by the child
process a copy of the variable is given to the child
process. the process which modifies the value will see the
modified value. the other process will see the value
obefore modification.

export statement makes a variable as environment
variable ,visible to child

Is This Answer Correct ?    1 Yes 10 No

How can a parent and child process communicate?..

Answer / sanjay

An Application programming interface (API) is a source code
interface that an operating system or library provides to
support requests for services to be made of it by computer
programs. Advanced programming interface is a near synonym
with wider application that predates the current common
usage. In the original term the concept is meant to
represent any well defined interface between two separate
programs. The main difference is that this older term does
not inculcate a parent-child relationship and can therefore
be applied to peer-to-peer situations more logically, e.g.
internal kernel services which can present themselves as
separate programs.

Is This Answer Correct ?    2 Yes 15 No

Post New Answer

More Unix IPC Interview Questions

what is the very first process created by kernell

5 Answers  


How to write the program on full-duplex communication on biderctional(e.g using two pipes)

2 Answers   Infosys,


How to know whether the message queue is empty or not.

1 Answers   Fibcom, HCL,


What is semaphone?

5 Answers   HCL,


What is i-node numbers?

0 Answers  






Please describe the initial process sequence while the system boots up?

0 Answers  


Predict the output of the following program code main() { fork(); printf("Hello World!"); }

3 Answers  


How to write the program on full-duplex communication using 2 FIFOs

0 Answers  


What is an advantage of executing a process in background?

2 Answers  


What is the condition required for dead lock in unix system?

0 Answers  


How to write the program on full-duplex communication on bidirectional?

0 Answers  


What are two different models of ipc differentiate both?

0 Answers  


Categories