rpms/procps/FC-4 procps-3.2.5-top-rc.patch, NONE, 1.1 procps-3.2.5-top-sigwinch.patch, NONE, 1.1 procps-3.2.5-vmstat-parg.patch, NONE, 1.1 procps.spec, 1.37, 1.38
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Jul 8 08:56:36 UTC 2005
Author: kzak
Update of /cvs/dist/rpms/procps/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv10173
Modified Files:
procps.spec
Added Files:
procps-3.2.5-top-rc.patch procps-3.2.5-top-sigwinch.patch
procps-3.2.5-vmstat-parg.patch
Log Message:
- fix #161449 - "top" ignores user and system toprc
- fix #161559 - top segfaults when resizing konsole
- fix #160796 - vmstat crashes when accessing LVM partition.
procps-3.2.5-top-rc.patch:
top.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
--- NEW FILE procps-3.2.5-top-rc.patch ---
--- procps-3.2.5/top.c.rc 2005-06-28 17:53:14.000000000 +0200
+++ procps-3.2.5/top.c 2005-06-28 17:58:36.000000000 +0200
@@ -2365,7 +2365,7 @@
for (i = 0; i < GROUPSMAX; i++) {
w = &Winstk[i];
w->winnum = i + 1;
- w->rc = Rc.win[i];
+ memcpy(&w->rc, &Rc.win[i], sizeof(RCF_t));
w->captab[0] = Cap_norm;
w->captab[1] = Cap_norm;
w->captab[2] = w->cap_bold;
@@ -2375,9 +2375,10 @@
w->captab[6] = w->capclr_hdr;
w->captab[7] = w->capclr_rowhigh;
w->captab[8] = w->capclr_rownorm;
- w->next = w + 1;
- w->prev = w - 1;
- ++w;
+ if (i < GROUPSMAX+1)
+ w->next = w + 1;
+ if (i > 0)
+ w->prev = w - 1;
}
/* fixup the circular chains... */
Winstk[3].next = &Winstk[0];
procps-3.2.5-top-sigwinch.patch:
top.c | 29 ++++++++++++++++++++++-------
1 files changed, 22 insertions(+), 7 deletions(-)
--- NEW FILE procps-3.2.5-top-sigwinch.patch ---
--- procps-3.2.5/top.c.sigwinch 2005-06-28 14:31:18.607714424 +0200
+++ procps-3.2.5/top.c 2005-06-28 14:53:21.179652928 +0200
@@ -140,6 +140,9 @@
buffer is used, stdout is flushed at frame end or if interactive. */
static char *Pseudo_scrn;
static int Pseudo_row, Pseudo_cols, Pseudo_size;
+
+static int Screen_resized;
+
#ifndef STDOUT_IOLBF
// less than stdout's normal buffer but with luck mostly '\n' anyway
static char Stdout_buf[2048];
@@ -2298,14 +2301,18 @@
// Set the screen dimensions and arrange for the real workhorse.
// (also) catches:
// SIGWINCH and SIGCONT
-static void wins_resize (int dont_care_sig)
+static void wins_resize_handler(int dont_care_sig)
+{
+ (void)dont_care_sig;
+ Screen_resized = 1;
+}
+
+static void wins_resize (void)
{
struct winsize wz;
char *env_columns; // Unix98 environment variable COLUMNS
char *env_lines; // Unix98 environment variable LINES
- (void)dont_care_sig;
-
Screen_cols = columns; // <term.h>
Screen_rows = lines; // <term.h>
@@ -2349,6 +2356,9 @@
// force rebuild of column headers AND libproc/readproc requirements
Frames_libflags = 0;
+
+ Screen_resized = 0;
+
ZAP_TIMEOUT
}
@@ -2397,7 +2407,7 @@
capsmk(&Winstk[i]);
}
// rely on this next guy to force a call (eventually) to reframewins
- wins_resize(0);
+ wins_resize();
}
@@ -2429,7 +2439,7 @@
case 'A':
Rc.mode_altscr = !Rc.mode_altscr;
- wins_resize(0);
+ wins_resize();
break;
case 'b':
@@ -3262,8 +3272,8 @@
signal(SIGTSTP, suspend);
signal(SIGTTIN, suspend);
signal(SIGTTOU, suspend);
- signal(SIGCONT, wins_resize);
- signal(SIGWINCH, wins_resize);
+ signal(SIGCONT, wins_resize_handler);
+ signal(SIGWINCH, wins_resize_handler);
for (;;) {
frame_make();
@@ -3277,6 +3287,8 @@
if (Batch) {
select(0, NULL, NULL, NULL, &tv); // ought to loop until done
+ if (Screen_resized)
+ wins_resize();
} else {
long file_flags;
int rc;
@@ -3298,6 +3310,9 @@
select(1, &fs, NULL, NULL, &tv);
fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK|file_flags);
}
+ if (Screen_resized)
+ /* maybe select() wake up after signal */
+ wins_resize();
if (chin(0, &c, 1) > 0) {
fcntl(STDIN_FILENO, F_SETFL, file_flags);
do_key((unsigned)c);
procps-3.2.5-vmstat-parg.patch:
vmstat.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE procps-3.2.5-vmstat-parg.patch ---
--- procps-3.2.5/vmstat.c.parg 2005-06-28 14:57:15.819982176 +0200
+++ procps-3.2.5/vmstat.c 2005-06-28 14:57:38.801488456 +0200
@@ -608,7 +608,7 @@
statMode |= PARTITIONSTAT;
if (argv[1]){
++argv;
- sprintf(partition, "%s", *argv);
+ snprintf(partition, sizeof(partition), "%s", *argv);
}else{fprintf(stderr, "-p requires an argument\n");
exit(EXIT_FAILURE);
}
Index: procps.spec
===================================================================
RCS file: /cvs/dist/rpms/procps/FC-4/procps.spec,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- procps.spec 10 May 2005 12:05:17 -0000 1.37
+++ procps.spec 8 Jul 2005 08:56:34 -0000 1.38
@@ -1,7 +1,7 @@
Summary: System and process monitoring utilities.
Name: procps
Version: 3.2.5
-Release: 6
+Release: 6.1
License: GPL
Group: Applications/System
Source: http://procps.sourceforge.net/procps-%{version}.tar.gz
@@ -16,7 +16,14 @@
Patch6: procps-3.2.3-noproc.patch
Patch7: procps-3.2.3-pseudo.patch
Patch8: procps-3.2.4-0x9b.patch
+# 157725 - sysctl -A returns an error
Patch9: procps-3.2.5-sysctl-writeonly.patch
+# 161449 - "top" ignores user and system toprc
+Patch10: procps-3.2.5-top-rc.patch
+# 161559 - top segfaults when resizing konsole
+Patch11: procps-3.2.5-top-sigwinch.patch
+# 160796 - vmstat crashes when accessing LVM partition.
+Patch12: procps-3.2.5-vmstat-parg.patch
BuildRequires: ncurses-devel
@@ -53,6 +60,9 @@
%patch7 -p1 -b .pseudo
%patch8 -p1 -b .0x9b
%patch9 -p1 -b .writeonly
+%patch10 -p1 -b .rc
+%patch11 -p1 -b .sigwinch
+%patch12 -p1 -b .parg
cp %SOURCE1 .
@@ -90,6 +100,11 @@
%attr(0644,root,root) %{_mandir}/man5/*
%changelog
+* Fri Jul 8 2005 Karel Zak <kzak at redhat.com> 3.2.5-6.1
+- fix #161449 - "top" ignores user and system toprc
+- fix #161559 - top segfaults when resizing konsole
+- fix #160796 - vmstat crashes when accessing LVM partition.
+
* Tue May 10 2005 Karel Zak <kzak at redhat.com> 3.2.5-6
- fix permissions in the spec install section
@@ -348,7 +363,7 @@
* Mon Apr 15 2002 Bill Nottingham <notting at redhat.com> 2.0.7-12
- add ldconfig in %postun
-* Mon Aug 27 2001 Trond Eivind Glomsrød <teg at redhat.com> 2.0.7-11
+* Mon Aug 27 2001 Trond Eivind Glomsrod <teg at redhat.com> 2.0.7-11
- Add ncurses-devel as a build dependency (#49562)
* Sat Jul 21 2001 Tim Powers <timp at redhat.com>
More information about the fedora-cvs-commits
mailing list