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

Are sockets bidirectional?

427


What is the use of PF_INET or AF_INET?

1095


How to Obtaine the Socket Address?

1015


How TCP/IP Handles Lost Packets?

1236


What is the use of setprotoent(3) Function?

1139






How to Form Traditional Local Addresses?

954


What are sockets in linux?

491


How to read socket file in linux?

505


How to Form Abstract Local Addresses?

988


What are Anonymous Calls?

987


Are sockets full duplex?

487


How does socket communication work?

479


What is socket connection?

480


What is the use of PF_INET and SOCK_DGRAM?

1065


HOW TCP/IP Handles Duplicated Packets?

1224