I am sorry if my question seems silly. I have a query regarding new process creation in operating system. Consider the following simple C code:
//hello.c
#include <stdio.h>
int main()
{
printf("Hello World\n");
return 0;
}
When is Compiled with gcc.
gcc hello.c
now executing the executable a.out
./a.out
Now I don't understand how in this case New Process
is created, who calls the fork()
and exec
system calls and which process is duplicated
to have a.out as child process? In this example, parent process explicitly calls fork system call to create child process but in above hello.c code there is no fork call.