bceda2
diff -up ./ps/display.c.ori ./ps/display.c
bceda2
--- ./ps/display.c.ori	2021-02-09 11:11:25.000000000 +0100
bceda2
+++ ./ps/display.c	2022-11-29 18:39:13.254573784 +0100
bceda2
@@ -44,6 +44,8 @@
bceda2
 #define SIGCHLD SIGCLD
bceda2
 #endif
bceda2
 
bceda2
+#define SIG_IS_TERM_OR_HUP(signo) (((signo) == SIGTERM) || (signo) == SIGHUP)
bceda2
+
bceda2
 char *myname;
bceda2
 
bceda2
 /* just reports a crash */
bceda2
@@ -54,20 +56,23 @@ static void signal_handler(int signo){
bceda2
   sigprocmask(SIG_BLOCK, &ss, NULL);
bceda2
   if(signo==SIGPIPE) _exit(0);  /* "ps | head" will cause this */
bceda2
   /* fprintf() is not reentrant, but we _exit() anyway */
bceda2
-  fprintf(stderr,
bceda2
-    _("Signal %d (%s) caught by %s (%s).\n"),
bceda2
-    signo,
bceda2
-    signal_number_to_name(signo),
bceda2
-    myname,
bceda2
-    PACKAGE_VERSION
bceda2
-  );
bceda2
+  if (!SIG_IS_TERM_OR_HUP(signo)) {
bceda2
+    fprintf(stderr,
bceda2
+      _("Signal %d (%s) caught by %s (%s).\n"),
bceda2
+      signo,
bceda2
+      signal_number_to_name(signo),
bceda2
+      myname,
bceda2
+      PACKAGE_VERSION
bceda2
+    );
bceda2
+  }
bceda2
   switch (signo) {
bceda2
     case SIGHUP:
bceda2
     case SIGUSR1:
bceda2
     case SIGUSR2:
bceda2
       exit(EXIT_FAILURE);
bceda2
     default:
bceda2
-      error_at_line(0, 0, __FILE__, __LINE__, "%s", _("please report this bug"));
bceda2
+      if (!SIG_IS_TERM_OR_HUP(signo))
bceda2
+        error_at_line(0, 0, __FILE__, __LINE__, "%s", _("please report this bug"));
bceda2
       signal(signo, SIG_DFL);  /* allow core file creation */
bceda2
       sigemptyset(&ss);
bceda2
       sigaddset(&ss, signo);