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 do udp sockets work?

493


What is socket and how it works?

483


What is the use of inet_aton() Function?

1072


How to Write a UDP Datagram Server?

948


What is the Use of the inet_makeaddr() Function?

960






How to Understand Network Byte Order?

1030


How to Deal with Duplicated Sockets?

1162


How to use the socket(2) Function?

999


How to Define a Socket?

1006


What are the best linux system programming interview questions you've ever asked or been asked?

458


What is the use of recvfrom(2) Function?

988


What is socket abstraction?

493


How to Understand Netmask Values?

957


What is the use of endservent(3) Function?

1181


How to Form Internet (IPv4) Socket Addresses?

999