In your code, the child of each fork proceeds directly to the printf("End"). Only the parent will print L1, L2, L3, so they'll only be printed once each, in that order. Mixed in with that output would be the Ends of the children (and the final end of the parent).