svn commit: r197684 - head/sys/ddb

John Baldwin jhb at FreeBSD.org
Thu Oct 1 19:12:14 UTC 2009


Author: jhb
Date: Thu Oct  1 19:12:14 2009
New Revision: 197684
URL: http://svn.freebsd.org/changeset/base/197684

Log:
  Put square backets ([]) around process names for system processes to patch
  the behavior of ps(1).

Modified:
  head/sys/ddb/db_ps.c

Modified: head/sys/ddb/db_ps.c
==============================================================================
--- head/sys/ddb/db_ps.c	Thu Oct  1 18:58:26 2009	(r197683)
+++ head/sys/ddb/db_ps.c	Thu Oct  1 19:12:14 2009	(r197684)
@@ -189,13 +189,19 @@ db_ps(db_expr_t addr, boolean_t hasaddr,
 		if (cred != NULL && jailed(cred))
 			strlcat(state, "J", sizeof(state));
 		db_printf(" %-6.6s ", state);
-		if (p->p_flag & P_HADTHREADS)
+		if (p->p_flag & P_HADTHREADS) {
 #ifdef __LP64__
-			db_printf(" (threaded)                  %s\n",
-			    p->p_comm);
+			db_printf(" (threaded)                  ");
 #else
-			db_printf(" (threaded)          %s\n", p->p_comm);
+			db_printf(" (threaded)          ");
 #endif
+			if (p->p_flag & P_SYSTEM)
+				db_printf("[");
+			db_printf("%s", p->p_comm);
+			if (p->p_flag & P_SYSTEM)
+				db_printf("]");
+			db_printf("\n");
+		}
 		FOREACH_THREAD_IN_PROC(p, td) {
 			dumpthread(p, td, p->p_flag & P_HADTHREADS);
 			if (db_pager_quit)


More information about the svn-src-head mailing list