what is the difference between fork() & exec()

Answer Posted / amit

what is the difference between fork() & exec()?

fork() creates a new child process and subsequently a new
entry in process table is made for the new process.

exec(), if successful, replaces the existing text segnent
of the process with that of new process. and hence, the old
process does not exists in the system any more. i dont
think, any new entry is created in the process table after
successful exec().

Is This Answer Correct ?    17 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to Understand Network Byte Order?

1013


How to Initialize a Wild Internet Address?

1020


What is the Use of the inet_makeaddr() Function?

934


How to Perform Input/Output of Datagrams?

930


How to Test with Other IP Numbers?

1054






How to Specify the Domain of a Socket?

1027


Can you send and receive on the same socket at the same time?

447


Are sockets bidirectional?

415


How to Form Abstract Local Addresses?

981


What is the use getservent(3)?

1128


What are sockets in linux?

479


How to Test with No Server?

1080


What does socket consist of?

444


How to Obtaine the Socket Address?

995


How to Define a Socket?

976