On Mon, Mar 23, 2026 at 09:48:35AM -0400, Stefan Monnier wrote: > I have no idea what's really going on, but I think there are two > possible explanations:
I have found the cause of the problem. When my editor receives a signal (any catchable signal) it produces some messages (signal xx received; command trace; ...) and then saves modified buffers (to recovery file) and then says goodbye. The what-is-happening messages are first in case saving buffers causes another signal. I removed generation of all of these messages and the recovery file is generated. So it seems that when the system is shutting down any terminal output causes the program to be immediately terminated or possibly just suspended and then later terminated. The solution, for me, is simple: do not generate nice 'error: this is happening' messages when a SIGTERM is received, but do so with other signals. The most common is SIGHUP when a network error kills a ssh session (this works as expected). This is, IMHO, unexpected behaviour. In a shutdown situation the messages should be accepted and: output or ignored/thrown-away depending on what is possible. I suspect that many programs will say something, a quick search shows an example of this: https://www.ibm.com/support/pages/how-applications-can-detect-when-job-ending-controlled-manner So: problem with systemd ? What do you think ? -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 https://www.phcomp.co.uk/ Parliament Hill Computers. Registration Information: https://www.phcomp.co.uk/Contact.html #include <std_disclaimer.h>

