H
harishashim
I sure hope this question is relevent to comp.lang.c++ . I have my
doubt but here I go!
I have very code that do as follows
pid_t pId = fork();
//Very large body of code
codeline1();
codeline2();
codeline3();
//etc etc etc
if (pId == 0) {
//child codes
}else if (pId < 0 ) {
//some error codes
}else {
//parent codes
}
My question is codeline1(), codeline2() and codeline3(). Are they
executed by the parent children or both?
Any comments?
Thanks In Advance!
doubt but here I go!
I have very code that do as follows
pid_t pId = fork();
//Very large body of code
codeline1();
codeline2();
codeline3();
//etc etc etc
if (pId == 0) {
//child codes
}else if (pId < 0 ) {
//some error codes
}else {
//parent codes
}
My question is codeline1(), codeline2() and codeline3(). Are they
executed by the parent children or both?
Any comments?
Thanks In Advance!