not closing the pipes here prevents some data loss

Otherwise if the cloned process exits too quickly the pipes are
destroyed and the program with suffer data loss or other strange
behaviours.