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 Choose a Socket Type?

940


How to use the socket(2) Function?

996


How to perform I/O on Sockets?

914


How to Form Internet (IPv4) Socket Addresses?

998


How to use the PF_LOCAL and AF_LOCAL Macros?

1072






What is the use of SOCK_STREAM Socket Type?

1029


What are Private IP Numbers?

894


How to Initialize a Wild Internet Address?

1041


What is the use of SOCK_DGRAM Socket Type?

1000


How to Examin the /etc/services File?

1193


What is the use getservent(3)?

1145


How TCP/IP Handles Lost Packets?

1248


What are Anonymous Calls?

995


What is the use of inet_aton() Function?

1070


How to Specify an X.25 Address?

1003