Dr. Werner Fink 2015-03-24 11:58:59 +00:00 committed by Git OBS Bridge
parent fe53807083
commit 15ffa20b19
3 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,26 @@
---
src/pstree.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- src/pstree.c
+++ src/pstree.c 2015-03-24 11:49:59.221518469 +0000
@@ -826,6 +826,7 @@ static char* get_threadname(const pid_t
if (! (threadname = malloc(COMM_LEN + 2 + 1))) {
exit(2);
}
+ *threadname = '\0';
if (snprintf(path, PATH_MAX, "%s/%d/task/%d/stat", PROC_BASE, pid, tid) < 0)
perror("get_threadname: asprintf");
if ( (file = fopen(path, "r")) != NULL) {
@@ -839,10 +840,10 @@ static char* get_threadname(const pid_t
return threadname;
}
}
+ fclose(file);
}
/* Fall back to old method */
sprintf(threadname, "{%.*s}", COMM_LEN, comm);
- fclose(file);
return threadname;
}

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Mar 24 11:58:08 UTC 2015 - werner@suse.de
- Add patch psmisc-22.21-boo908063.patch to avoid to close files
which are never open (boo#908063)
-------------------------------------------------------------------
Fri Apr 25 00:59:39 CEST 2014 - ro@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package psmisc
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -34,6 +34,8 @@ Source: http://sourceforge.net/projects/psmisc/files/psmisc/%{name}-%{ve
Patch0: %name-22.21.dif
Patch1: %name-22.12-tigetstr.patch
Patch2: %name-22.21-pstree.patch
# PATCH-FIX-SUSE boo#boo908063 -- partly upstream already
Patch3: %name-22.21-boo908063.patch
Patch42: %{name}-22.21-upstream.patch
# PATCH-FIX-UPSTREAM psmisc-git-3638cc55b4d08851faba46635d737b24d016665b.patch bnc#874983
Patch43: %{name}-git-3638cc55b4d08851faba46635d737b24d016665b.patch
@ -55,6 +57,7 @@ processes that are using specified files or filesystems.
%patch42 -p0 -b .up
%patch1 -p0 -b .tigetstr
%patch2 -p0 -b .pstree
%patch3 -p0 -b .thread
%patch0 -p0 -b .0
%patch43 -p1 -b .fuserfix