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

Why socket programming is used?

567


How to Initialize a Wild Internet Address?

1132


How to Deal with Duplicated Sockets?

1236


How TCP/IP Handles Flow Control?

1221


What is the use getservent(3)?

1223






What is the use of setprotoent(3) Function?

1224


How to Choose a Socket Type?

1041


What is AF_UNSPEC Address?

1914


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

537


How to test socket connection in linux?

572


How socket is created?

545


What are Anonymous Calls?

1075


How to Examin the Generic Socket Address?

1081


What is a socket in linux?

596


What is socket linux?

553