So I\'m getting to know how processes work and have written some simple code.
#include #include #include #i
If you write
printf("Heeeyoooo!"); fflush(stdout);
and then fork, the error goes away. The reason is that fork() clones the output buffer for stdout while "Heeeyoooo!" is still in it, so it is subsequently printed twice.
fork()
"Heeeyoooo!"