init fork code