[memprof: 65/76] leakdetect.c: Update for newer kernels



commit 0c84b032f945935eaf7f765a51545ff7407cebc5
Author: Holger Hans Peter Freyther <zecke selfish org>
Date:   Tue Mar 9 07:59:54 2010 +0100

    leakdetect.c: Update for newer kernels
    
    With my current kernel the /proc/pid/status is using a lowercase
    't' for the status of traced stopped. Change the logic to turn the
    char into a lower case and then compare it with 't'.

 src/leakdetect.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/leakdetect.c b/src/leakdetect.c
index a2b13f4..a1939a1 100644
--- a/src/leakdetect.c
+++ b/src/leakdetect.c
@@ -21,6 +21,7 @@
 /*====*/
 
 #include <sys/mman.h>
+#include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <signal.h>
@@ -396,7 +397,7 @@ leaks_find (MPProcess *process)
 		/* Wait for the processes we are tracing to actually stop */
 
 		/* waitpid(clone->pid, &status, WUNTRACED); */
-		while (process_status (clone->pid) != 'T') {
+		while (tolower(process_status (clone->pid)) != 't') {
 			usleep(50000);
 		}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]