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 Initialize a Wild Internet Address?

1124


What is a socket in linux?

578


What are Reserved IP Numbers?

1078


Can a socket have multiple connections?

548


What is the use of setprotoent(3) Function?

1210






How to Manipulate IP Numbers?

1046


What is the use of PF_INET and SOCK_STREAM?

1047


What is the use getservent(3)?

1212


What is the Use of the inet_ntoa() Function?

997


How to Form Traditional Local Addresses?

1013


What is socket and how it works?

549


How to Deal with Duplicated Sockets?

1225


Are sockets full duplex?

553


How do udp sockets work?

560


How to Form Abstract Local Addresses?

1053