Just 1 question, when I fork(), I have created parent and child process. It is possible to terminate my parent while my child is still running?
basic on this diagram? Differences between fork and exec
if(!fork())
{
//child
while(1);
}
else
{
//parent
exit();
}
Another scenario is if my child terminated. my parent is able to received the return value from main? if yes, how do i retrieve the value?
What is the different between exec and execlp?
lastly, I understand that when you exec you are overwrite the memory (heap, stack, text, data). Basically, call new .exe . But under the PCB? only the PID, PPID remain while the state and sp all overwrite?