The thing that initially got me jittery was a shutdown script (from an
elderly Slackware) that first signalled term to everything, waited five
seconds and signalled kill. But if the term resulted in a dialogue
asking whether the state is to be saved then presumably the kill would
never OK this.

That is afaik still the default behaviour of init. You have 5 secs
between SIGTERM and SIGKILL. Are all users going to click OK in 5 secs?
Also watch out that a signal handler runs asynchronously. You aren't
allowed to do a lot in a signal handler and should not use non-reentrant
functions such as malloc. Pop ups in signal handlers are not a good idea.


Additionally the X11 server might already be shutdown itself. E.g. on my ArchLinux system the X11 server is shutdown as one of the first (which takes all GUI applications with it without asking) and only then all remaining processes are terminated using SIGTERM and afterwards SIGKILL.

Regards,
Sven


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to