Hi folks,
habe ein kleines fork() Problem.
Was ich haben moechte:
Ein Elternprozess und dieser soll 2 schlafende Kindprozesse beherbergen. Das sollte dann so ausschauen:
Elternprozess
- - - - - Kind A (Schlafend)
- - - - - Kind B (Schlafend)
Hier mein Versuch:
Nur was ich hier bekomme ist folgendes:Code:pid_t a = fork(); if(a == 0) { pid_t b = fork(); if(b == 0) { } if(b > 0) { wait(); } } if(a > 0 ) { wait(); }
Elternprozess
- - - - - Kind A
- - - - - - - - - - Kind B
Lesezeichen