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

Answer Posted / nitin

fork() creates a child process with most of the attributes
of the parent process. Both parent and child processes are
executed simultaneously.
exec() replaces the current process with a the executable
pointed by the function. Control never returns to the
original program unless there is an exec() error.

Is This Answer Correct ?    89 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is AF_UNSPEC Address?

1777


What is the use of recvfrom(2) Function?

970


How to Compare Sockets to Pipes?

952


What is the Use of the inet_ntoa() Function?

919


What is socket linux?

466






How to Examin the Generic Socket Address?

975


How to Obtaine the Socket Address?

996


How to Form Local Addresses?

991


What is socket file in linux?

487


How to Test with Other IP Numbers?

1054


What are Private IP Numbers?

878


How to use the socket(2) Function?

971


What is the use of SOCK_DGRAM Socket Type?

974


How socket is created?

451


What is the use of inet_addr() Function?

971