Im rooting my phone (HTC One Alps) via Kingo Android Root. When i connect my phone to the computer and start rooting then phone shutdown itself.
Is there any partition or disk problem?
If reboot: This is just part of the process of rooting on some devices and some devices it won't do this.
If shut down: It means the root is installed on your phone and the rooting process is finished.
Hope this helps