Expand description
§pispas_service — Windows service wrapper
Thin wrapper that registers with the Windows Service Control Manager
(SCM) and, once SCM has started it, spawns and supervises the real
runtime binary (pispas_modules).
Why this extra layer? Because:
- SCM expects a binary that implements the service dispatch loop
(
ServiceMain).pispas_modulesis a plaintokio::main— easier to develop and test stand-alone without SCM ceremony. - This wrapper handles
STOP/PAUSE/CONTINUEevents coming from the SCM and translates them into graceful shutdown / restart signals forpispas_modules. - Keeps SCM-specific Windows-API code isolated from the business logic.
Windows SCM --start/stop--> pispas-service.exe (THIS BIN)
|
| spawn / signal
v
pispas-modules.exeThe installer (pispas-installer.exe, via pispas-elevator.exe for
UAC) calls sc create "PispasService" binPath=… pointing at this
binary.
Implementation details live in the service module next to this file.
Authors: Jorge.A Duran & Mario González · pispas Technologies SL · 2023.
Modules§
- service 🔒
Functions§
- init_
logging 🔒 - main 🔒