Hi,
I noticed that thread names are truncated by one character (to 14
characters instead of 15), the below patch fixes the issue. (The
attached patch has proper whitespaces !)
--- busybox-1.21.0/procps/pstree.c.orig 2013-06-01 02:27:14.008530872 +0200
+++ busybox-1.21.0/procps/pstree.c 2013-06-01 02:31:36.483537110 +0200
@@ -342,7 +342,7 @@
static void handle_thread(const char *comm, pid_t pid, pid_t ppid, uid_t uid)
{
char threadname[COMM_LEN + 2];
- sprintf(threadname, "{%.*s}", COMM_LEN - 2, comm);
+ sprintf(threadname, "{%.*s}", COMM_LEN - 1, comm);
add_proc(threadname, pid, ppid, uid/*, 1*/);
}
#endif
--
-- dag wieers, [email protected], http://dag.wieers.com/
-- dagit linux solutions, [email protected], http://dagit.net/
[Any errors in spelling, tact or fact are transmission errors]--- busybox-1.21.0/procps/pstree.c.orig 2013-06-01 02:27:14.008530872 +0200
+++ busybox-1.21.0/procps/pstree.c 2013-06-01 02:31:36.483537110 +0200
@@ -342,7 +342,7 @@
static void handle_thread(const char *comm, pid_t pid, pid_t ppid, uid_t uid)
{
char threadname[COMM_LEN + 2];
- sprintf(threadname, "{%.*s}", COMM_LEN - 2, comm);
+ sprintf(threadname, "{%.*s}", COMM_LEN - 1, comm);
add_proc(threadname, pid, ppid, uid/*, 1*/);
}
#endif
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox