summaryrefslogtreecommitdiffstats
path: root/patches/procps-3.2.7/generic/30_pgrep_start_time.dpatch
blob: f68fd569e5d675f9838bb528595beef6034b1ed4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#! /bin/sh -e
## 30_pgrep_start_time.dpatch by Craig Small <csmall@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: pgrep.c saved_start_time was missed

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"

if [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
       -patch) patch $patch_opts -p1 < $0;;
       -unpatch) patch $patch_opts -p1 -R < $0;;
        *)
                echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
ent"
                exit 1;;
esac

exit 0
@DPATCH@
--- procps-3.2.0.orig/pgrep.c
+++ procps-3.2.0/pgrep.c
@@ -367,7 +367,8 @@
 	preg = do_regcomp ();
 
 	if (opt_newest) saved_start_time =  0ULL;
-	if (opt_oldest) saved_start_time = ~0ULL;
+    else
+	    saved_start_time = ~0ULL;
 	if (opt_newest) saved_pid = 0;
 	if (opt_oldest) saved_pid = INT_MAX;