I’m trying to set up my server so that it auto-updates on certain dates, but to do that, I need to find a way to let the script doing the updating know that the server has been shut down for scheduled maintenance instead of, say, a crash. It’s mostly for logging purposes.
So I started checking the exit codes the process leaves behind, and I found this out:
If I close SRCDS with the EXIT command through the console, it returns 0.
If I close it from the Task Manager, it returns 1.
If I close it with the X button or with TASKKILL /IM SRCDS.exe, it returns -1073741510.
So there, nice and consistent.
I haven’t figured out a way to crash the server yet, but I suspect that I’d get the same exit code that I get from TASKKILL.
Is there a documentation for this?