diff options
| author | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-04-12 21:47:58 +0200 |
|---|---|---|
| committer | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-04-12 23:00:40 +0200 |
| commit | 0a8770ac7d382df8976b2448fccc6cfe434cd4d1 (patch) | |
| tree | 5551617b6bd61b069c9d538f19aea2dbc94b44c1 /src/spawn.c | |
| parent | 0e3d6c84a52326a1069fe4f7adc2930b974dfa5f (diff) | |
GTK: SIGTERM/SIGHUP always terminates the program and dumps recovery files
* SIGTERM used to insert the ^KCLOSE key macro.
However with the default ^KCLOSE macro, which inserts `EX`,
this may fail to terminate the editor if buffers are modified.
If the process is consequently killed by a non-ignorable signal,
we may still loose data.
* SIGTERM is used to gracefully shut down, so we now always terminate.
Since we have recovery files, they are now dumped before terminating.
This makes sure that recovery files are more up-to-date during
unexpected but gracefull terminations.
* The same functionality is planned on Curses, but requires more fundamental
changes (TODO).
Diffstat (limited to 'src/spawn.c')
| -rw-r--r-- | src/spawn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/spawn.c b/src/spawn.c index 61718fd..716bafa 100644 --- a/src/spawn.c +++ b/src/spawn.c @@ -869,7 +869,7 @@ teco_spawn_idle_cb(gpointer user_data) { if (G_LIKELY(!teco_interface_is_interrupted())) return G_SOURCE_CONTINUE; - teco_interrupted = FALSE; + teco_interrupted = TECO_NORMAL; /* * The first CTRL+C will try to gracefully terminate the process. |
