~ubuntu-branches/ubuntu/natty/procps/natty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/45_top_exitcode.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2009-06-03 07:28:56 UTC
  • mfrom: (2.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090603072856-zbj1y7nvc1bquf1o
Tags: 1:3.2.8-1ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/rules (Ubuntu-specific):
    - set init script to priority 17.
    - install sysctl files from new sysctl.d directory.
    - append debian/sysctl.d/*.conf.$DEB_HOST_ARCH to 10-arch-specific.conf
  - debian/sysctl.d (Ubuntu-specific):
    - 10-console-messages.conf: stop low-level kernel messages on console.
    - 10-network-security.conf: enable rp_filter and SYN-flood protection.
    - 10-keyboard.conf.powerpc: mouse button emulation on PowerPC.
  - Drop conf-file-cleanups in debian/{preinst,postinst,postrm}.
  - Drop pre-Hardy rcS.d procps.sh cleanups in debian/postinst.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
## 45_top_exitcode.dpatch by  <hesso@pool.math.tu-berlin.de>
3
 
##
4
 
## DP: Make top exit with return code 0 if the program was closed
5
 
## DP: cleanly ('q' or end of iteration loop).
6
 
 
7
 
@DPATCH@
8
 
--- procps-3.2.7/top.cO 2007-08-06 15:57:04.000000000 +0200
9
 
+++ procps-3.2.7/top.c  2007-08-06 16:04:07.000000000 +0200
10
 
@@ -402,14 +402,13 @@
11
 
 
12
 
 
13
 
         /*
14
 
-         * Normal end of execution.
15
 
+         * Normal end of execution. Exit with 1 if signaled, else 0.
16
 
          * catches:
17
 
          *    SIGALRM, SIGHUP, SIGINT, SIGPIPE, SIGQUIT and SIGTERM */
18
 
-static void end_pgm (int dont_care_sig) NORETURN;
19
 
-static void end_pgm (int dont_care_sig)
20
 
+static void end_pgm (int sig) NORETURN;
21
 
+static void end_pgm (int sig)
22
 
 {
23
 
-   (void)dont_care_sig;
24
 
-   bye_bye(stdout, 1, NULL);
25
 
+   bye_bye(stdout, !!sig, NULL);
26
 
 }
27
 
 
28