On Di, 26.11.24 12:06, Georg Müller (georgmueller@xxxxxxx) wrote: > Hi all, > > I am currently trying to set up a 3-step kill mode for an application and this seems not possible with systemd. > > Here is the scenario I a trying to achieve: > > * on 'systemctl stop ...', the service should receive the TERM signal (KillSignal=SIGTERM) > * after a certain amount of time, the service should receive the ABRT signal (FinalKillSignal=SIGABRT) > * the service has a signal handler for SIGABRT > * if, for some reason, the SIGABRT signal handler hangs, after some timeout, the service should be (really finnally) killed with an un-catchable > signal (SIGKILL) SIGABRT has a pretty clear usecase: to abnormally terminate a program while creating a coredump. It seems you want to redefine what SIGABRT is supposed to do? That's quite problematic I would say. What's the rationale for that? Note that systemd sends SIGABRT for various reasons on its own, for example in context of the per-service watchdog logic. Hence, redefining locally what it means substantially changes the contract between services and the service manager. Lennart -- Lennart Poettering, Berlin