Certain programs have different behaviours depending on the signal they receive when terminating the process. Terminate signals allows you to configure what system signal to send to a program on shutdown.
Terminate signals are configured per program and can be configured by setting the
program[N].terminate VCFG property.
- SIGTERM (default)
If a VCFG has no terminate signal set on a program,
SIGTERM will be used by default.
Note: Configured terminate signals are only sent to programs configured in the VCFG. All remaining processes are killed on system shutdown with
On shutdown, configured system signals are sent to terminate a program’s process. Once all of the program processes are finished the system will shutdown. This ensures that programs can clean upon termination.
A timeout can be set to kill program processes if they are taking too long. This timeout is system-wide and can be set with
system.terminate-wait VCFG property.
The timeout is the max amount of milliseconds to wait for program processes to finish before shutting down the system.
[[program]] binary = "/bin/postgres" terminate = "SIGQUIT" [system] terminate-wait = 3000
$ vorteil run ./postgres --system.terminate-wait=3000 --program.terminate=SIGQUIT
The above examples will send the Postgres program a SIGQUIT signal on shutdown, which will cause Postgres to shutdown in Immediate Shutdown mode. Additionally, if the shutdown is not done within 3000ms, vorteil will force shutdown all remaining process and system.