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

How to Perform Input/Output of Datagrams?

948


HOW TCP/IP Handles Duplicated Packets?

1236


What is the use getservent(3)?

1145


What is a socket in linux?

515


How to Form Abstract Local Addresses?

993






How to Specify the Domain of a Socket?

1049


How to Form Local Addresses?

1017


How TCP/IP Handles Sequencing?

1155


How do udp sockets work?

491


What are Anonymous Calls?

995


How to read socket file in linux?

511


How does socket communication work?

489


How to Reply to a Wild Address?

1210


What is the use of PF_INET and SOCK_DGRAM?

1071


How to Obtaine the Socket Address?

1020