Change Whether Your Mac Will Automatically Reboot After System Freeze or Not
By default, your Mac should restart if it freezes. This is fine for most of us, but automatic restart can make troubleshooting difficult for power users. OS X Daily shows you how to change it using a terminal command.
You can check what behavior your Mac is configured for by entering this command in Terminal:
sudo systemsetup -getrestartfreeze
If you want to disable the restart function, you need to enter the following:
sudo systemsetup -setrestartfreeze off
It’s worth keeping in mind that when you disable this option, your Mac will simply be frozen. It doesn’t reboot by itself, so you’ll need to do it manually. However, if you are having problems with hidden freezing and restarting your Mac, this is one way to try and figure out what’s going on.
Set your Mac to restart automatically when the system freezes | OS X Daily