To avoid that this kind of situation from happening in which you lose control of your PC, you have Don't Sleep. It is a utility that blocks the shutdown, reboot, stand by, turn off and hibernation processes during a period that the user has to predetermined.
Furthermore, Don't Sleep is also capable of impeding that your system logs off, your screen turns off or the screensaver activates. Thus, without having to modify any of your system configuration's parameters, you will be able to avoid certain actions taking place on your computer.
Avoid unpleasant surprises due to an unexpected turn off when you are working with your PC, thanks to Don't Sleep.