[python-win32] Setting service exit code on stop

2020-08-09 Thread Robert Kearns
Hello all, I am having a look through the C++ source code (in particular win32/src/PythonService.cpp), trying to deduce a way to have the Python service set the exit code on stop. It appears that on a successful stop, both exit codes (svc and win32) are set to 0, overriding any previously set val

Re: [python-win32] Setting service exit code on stop

2020-08-09 Thread Mark Hammond
Do you mean the process exit code? There's no direct way to influence that, although you can probably just arrange to kill your own process - you'll need to manually ensure you've set the service status before you do this. See also https://github.com/mhammond/pywin32/issues/1563 where there's