From 1c38c7a67e9d4d68e27c6ad183d1cccbb5596ddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 16:51:57 +0200 Subject: Adding debian version 8.2-1.3. Signed-off-by: Daniel Baumann --- debian/patches/rlfe-history.diff | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 debian/patches/rlfe-history.diff (limited to 'debian/patches/rlfe-history.diff') diff --git a/debian/patches/rlfe-history.diff b/debian/patches/rlfe-history.diff new file mode 100644 index 0000000..7962003 --- /dev/null +++ b/debian/patches/rlfe-history.diff @@ -0,0 +1,50 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rlfe-history.dpatch by +## +## DP: Fix rlfe, always writing a history file. + +@DPATCH@ +--- a/examples/rlfe/rlfe.c ++++ b/examples/rlfe/rlfe.c +@@ -154,21 +154,27 @@ struct termios orig_term; + static pid_t child = -1; + + static void +-sig_child (int signo) ++finish_up() + { +- int status; +- wait (&status); + if (hist_file != 0) + { + write_history (hist_file); + if (hist_size) + history_truncate_file (hist_file, hist_size); + } +- DPRINT0 ("(Child process died.)\n"); + tcsetattr(STDIN_FILENO, TCSANOW, &orig_term); + exit (0); + } + ++static void ++sig_child (int signo) ++{ ++ int status; ++ wait (&status); ++ DPRINT0 ("(Child process died.)\n"); ++ finish_up(); ++} ++ + volatile int propagate_sigwinch = 0; + + /* sigwinch_handler +@@ -710,8 +716,7 @@ main(int argc, char** argv) + if (count <= 0) + { + DPRINT0 ("(Connection closed by foreign host.)\n"); +- tcsetattr(STDIN_FILENO, TCSANOW, &orig_term); +- exit (0); ++ finish_up(); + } + old_count = buf_count; + -- cgit v1.2.3