When I try to run an example code about fork()
I get different output in AppCode than in terminal.
This is one of the functions I tried to use
/*
* fork3 - Three consective forks
* Parent and child can continue forking
*/
void fork3()
{
printf("L0\n");
fork();
printf("L1\n");
fork();
printf("L2\n");
fork();
printf("Bye\n");
}
And this is the different outputs I get
Screenshots:
Terminal:
AppCode:
And this happen to almost all functions in the educational code about fork()
.