Closed philipstarkey closed 3 years ago
@alexsilva I figured after learning about signals in the last few days I'd take a stab at doing #26 while I still remembered everything. Seems to work when run from command line and as a service (although Windows does not permit users to interact with graphical applications launched as services, but they still run and can receive the window events).
Haven't written any additional tests...wasn't sure if I should or what should be tested.
Hope this is useful. Let me know if you'd like any changes.
Looks good. I just put some observations on what could be changed before the merge. An excellent thing is the documentation and I should be doing that too.
This resolves #26
The
stopsignal
config option now supports Windows window events such asWM_CLOSE
(and other events prefixed withWM_
). These can also be specified using the negative of the event integer (negative numbers used to distinguish them from standard signals without having to introduce complex code into supervisor). For example,-16
corresponds toWM_CLOSE
. This allows custom user events (seeWM_USER
win32 documentation)