Reworked the pause/resume scripts for Apollo/Artemis.
Important
This is a personal refactor I'm sharing as-is. The original scripts have been used by more people and are the safer bet.
- Race condition fix: flipped the lock file protocol so
pausewrites the PID andresumereads it back. Handles out-of-order events where resume fires before pause. - Least-privilege access:
PROCESS_SUSPEND_RESUME(0x0800) instead ofPROCESS_ALL_ACCESS. May fix "suspend stopped working" reports. - Error handling: helpers return a boolean instead of calling
MsgBox+ExitApp, which was re-triggering the cleanup handler.