Systemd shutdown, halt and reboot handling
-
Then as I already suggested, dump a picture in your frame buffer as part of the procedure. Your application will be killed quickly so it won't have the time to show anything special in that case.
-
In addition to what @SGaist wrote, there are limitations of what you can and can't do in signal handlers. Not everything is allowed.
-
@kshegunov it is done not from signal handler, but from slot, connected to qsocketnotifier.
-
Depending on what you do, you will get a
SIGTERM
and aSIGKILL
right after. The later you can't interrupt nor try to do some more stuff. -
60 second per running process ?
-
Can you find that information again ?
-
@SGaist No. Maybe i am mistaken. I found some info here: http://manpages.ubuntu.com/manpages/cosmic/en/man5/systemd.service.5.html
Check section about
TimeoutStopSec=
. On my system it is commented out, but here stated, that it is even 90 s. As i understand it is applied per-unit. -
Is your application started as a systemd service ?
-
@SGaist Yes, it is started as systemd service. Finally i found the reason, why it hangs. It is happened because I made blocking syscall from event loop. So this thread can be closed and marked as resolved. Appproach with QSocketNotifier and signalfd works.