tag 646785 + patch
thanks

I have prepared a preliminary patch for that, based on the other
already known bugreport upstream. It is not yet commited to our repo
on master, and would need a bit of testing first.

Regards
Salvatore
Description: Add support for 't (tracing stop)', 'X (dead)', 'x (dead)'
 and 'K (wakekill)' states of processes
Origin: vendor
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=71976
Bug-Debian: http://bugs.debian.org/646785
Forwarded: yes
Author: Salvatore Bonaccorso <[email protected]>
Last-Update: 2011-10-27

--- a/os/Linux.c
+++ b/os/Linux.c
@@ -487,6 +487,9 @@
         case 'W':
             prs->state = get_string(WAIT);
             break;
+        case 'K':
+            prs->state = get_string(WAIT);
+            break;
         case 'R':
             prs->state = get_string(RUN);
             break;
@@ -502,6 +505,15 @@
         case 'T':
             prs->state = get_string(STOP);
             break;
+        case 't':
+            prs->state = get_string(STOP);
+            break;
+        case 'X':
+            prs->state = get_string(DEAD);
+            break;
+        case 'x':
+            prs->state = get_string(DEAD);
+            break;
         /* unknown state, state is already set to NULL */
         default:
             ppt_warn("Ran into unknown state (hex char: %x)", (int) prs->state_c);
--- a/os/Linux.h
+++ b/os/Linux.h
@@ -56,6 +56,7 @@
 	DEFUNCT,
 	STOP,
 	UWAIT,
+	DEAD,
 };
 
 
@@ -64,7 +65,7 @@
 static const char strings[] =
 {
 /* process state */
-	"sleep\0" "wait\0" "run\0" "idle\0" "defunct\0" "stop\0" "uwait\0"
+	"sleep\0" "wait\0" "run\0" "idle\0" "defunct\0" "stop\0" "uwait\0" "dead\0"
 /* error messages */
 	"/proc unavailable\0"
 	"intilization failed\0"
@@ -116,55 +117,55 @@
 static const size_t strings_index[] =
 {
 /* process status strings */
-	0, 6, 11, 15, 20, 28, 33,
+	0, 6, 11, 15, 20, 28, 33, 39,
 /* error messages */
-	39,	57,
+	44,	62,
 /* fields */
-	77,
-	81,
-	85,
-	89,
-	95,
-	100,
+	82,
+	86,
+	90,
+	94,
+	99,
 	105,
 	110,
-	117,
-	123,
-	130,
-	138,
-	145,
-	153,
-	159,
-	165,
-	172,
-	179,
-	188,
-	194,
+	115,
+	122,
+	128,
+	135,
+	143,
+	150,
+	158,
+	164,
+	170,
+	177,
+	184,
+	193,
 	199,
-	203,
-	209,
+	204,
+	208,
 	214,
-	220,
-	226,
+	219,
+	225,
 	231,
 	236,
 	241,
 	246,
 	251,
 	256,
-	263,
-	270,
-	279,
+	261,
+	268,
+	275,
 	284,
+	289,
 /* default format string (pre lower casing) */
-	288
+	293
 };
 
 enum string_name {
-	/* NOTE: we start this enum at 7, so we can use still keep using the
+	/* NOTE: we start this enum at 8, so we can use still keep using the
   	 * state enum, and have those correspond to the static strings */
 /* error messages */
-	STR_ERR_PROC_STATFS = 7,
+	STR_ERR_PROC_STATFS = 8,
 	STR_ERR_INIT,
 /* fields */
 	STR_FIELD_UID,
@@ -250,41 +251,41 @@
 
 static const char* const field_names[] =
 {
-	strings + 77,
-	strings + 81,
-	strings + 85,
-	strings + 89,
-	strings + 95,
+	strings + 82,
+	strings + 86,
+	strings + 90,
+	strings + 94,
 	strings + 100,
 	strings + 105,
 	strings + 110,
-	strings + 117,
-	strings + 123,
-	strings + 130,
-	strings + 138,
-	strings + 145,
-	strings + 153,
-	strings + 159,
-	strings + 165,
-	strings + 172,
-	strings + 179,
-	strings + 188,
-	strings + 194,
+	strings + 115,
+	strings + 122,
+	strings + 128,
+	strings + 135,
+	strings + 143,
+	strings + 150,
+	strings + 158,
+	strings + 164,
+	strings + 170,
+	strings + 177,
+	strings + 184,
+	strings + 193,
 	strings + 199,
-	strings + 203,
-	strings + 209,
+	strings + 204,
+	strings + 208,
 	strings + 214,
-	strings + 220,
-	strings + 226,
+	strings + 219,
+	strings + 225,
 	strings + 231,
 	strings + 236,
 	strings + 241,
 	strings + 246,
 	strings + 251,
 	strings + 256,
-	strings + 263,
-	strings + 270,
-	strings + 279,
-	strings + 284
+	strings + 261,
+	strings + 268,
+	strings + 275,
+	strings + 284,
+	strings + 289
 };
 

Attachment: signature.asc
Description: Digital signature

Reply via email to