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

Answer Posted / antony.t

fork() will create a new process and its a system call API its return values are- if fork created new process(child process), its pid will be returned, if it failed to create returns -1.

exec() is also a system call API but this will load a application, if exec() succeeds it will not return anything but 'll return -1 if it gets failed to load application...

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why bind system call is required in socket programming?

545


What is the Use of the inet_ntoa() Function?

1005


How TCP/IP Handles Flow Control?

1221


How to Define a Socket?

1104


What is the Use of the inet_makeaddr() Function?

1054






What is the Use of the inet_netof() Function?

968


How TCP/IP Handles Lost Packets?

1329


What is socket connection?

556


How to Understand Network Byte Order?

1110


How to Specify the Domain of a Socket?

1135


What are Anonymous Calls?

1075


How to test socket connection in linux?

572


How to Obtaine the Socket Address?

1119


How to Examin the Generic Socket Address?

1081


What is the use of endprotoent(3) Function

1416