fix #642800 - peekfd regression

This commit is contained in:
Jan Görig 2010-10-14 15:51:33 +02:00
parent b46e09c762
commit 63a033a650
2 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,13 @@
diff --git a/src/peekfd.c b/src/peekfd.c
index 2c30f25..6d759b9 100644
--- a/src/peekfd.c
+++ b/src/peekfd.c
@@ -199,7 +199,7 @@ int main(int argc, char **argv)
numfds = argc - optind;
fds = malloc(sizeof(int) * numfds);
for (i = 0; i < numfds; i++)
- fds[i] = atoi(argv[optind + i + 1]);
+ fds[i] = atoi(argv[optind + i]);
}
attach(target_pid);

View File

@ -1,7 +1,7 @@
Summary: Utilities for managing processes on your system
Name: psmisc
Version: 22.13
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2+
Group: Applications/System
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
@ -13,6 +13,8 @@ BuildRequires: gettext
BuildRequires: ncurses-devel
BuildRequires: autoconf automake
Patch1: psmisc-22.13-peekfd-segv.patch
%description
The psmisc package contains utilities for managing processes on your
system: pstree, killall and fuser. The pstree command displays a tree
@ -24,6 +26,8 @@ of processes that are using specified files or filesystems.
%prep
%setup -q
%patch1 -p1
%build
%configure --prefix=%{_prefix} --enable-selinux
make %{?_smp_mflags}
@ -55,6 +59,9 @@ rm -rf $RPM_BUILD_ROOT
%doc AUTHORS ChangeLog COPYING README
%changelog
* Thu Oct 14 2010 Jan Görig <jgorig@redhat.com> 22.13-3
- fix #642800 - peekfd regression
* Wed Sep 29 2010 jkeating - 22.13-2
- Rebuilt for gcc bug 634757