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

How to Compare Sockets to Pipes?

1053


What is the use of inet_addr() Function?

1054


What are the Advantages of TCP/IP?

1204


How TCP/IP Handles Lost Packets?

1321


What are Reserved IP Numbers?

1078






What is the use of setprotoent(3) Function?

1210


How to use the PF_LOCAL and AF_LOCAL Macros?

1184


How to Examin the Generic Socket Address?

1073


How to Deal with Duplicated Sockets?

1225


How to Form Traditional Local Addresses?

1016


What is the use of inet_network()?

1061


What is socket file in linux?

576


What is the setservent(3) Function?

1226


How to Obtaine the Socket Address?

1104


How does socket communication work?

575