Warum liefert diese fork () Ausgabe 8 anstatt 5?
So muss ich die Ausgabe dieses Codes finden, der das @ verwendfork()
Methode. Ich dachte, die Ausgabe wäre 5 "Hallo", aber stattdessen habe ich 8. Warum ist das so? Dies ist der Code:
#include "csapp.h"
void doit()
{
Fork();
Fork();
printf("hello\n");
return;
}
int main()
{
doit();
printf("hello\n");
exit(0);
}