.
I have to admit its been 40 years, but hitting “power off” did nothing on the machines I’ve used, unles one first hit “int req,” “Imm stop” by my recollection.
I was there chatting with the child's father when it happened. Very embarrassing! Early to mid 80's on a 4341, if memory serves.
I wouldn't be surprised if IBM put some protection in place later, but I haven't had my hands on an IBM mainframe in almost 30 years.
Modern PCs have a facility called ACPI (Advanced Configuration and Power Interface), which, among other things, allows the OS to trap and handle the pressing of the power button. E.g., it could perform an orderly shutdown before powering off. Or it could save a memory image to disk before powering off, thus avoiding a reboot on power-on.