hello,

I created 5 forks from the parent process using a recusive function.

This is the output:
I am the parent of all and my process ID is 371
My process ID is 374
Children ID 374 finish printing, time to sleep...
My process ID is 375
Children ID 375 finish printing, time to sleep...
My process ID is 377
Children ID 377 finish printing, time to sleep...
My process ID is 378
Parent ID 371 has finish creating forks, so time to sleep...
Children ID 378 finish printing, time to sleep...
My process ID is 380
Children ID 380 finish printing, time to sleep...

Why did the parent ID 371 started to sleep even before children ID 380 prints its line? I wanted the program to have the parent forks 5 times and each child will print a line.

Thanks.