From 8978b13ff90b8fc15f0b37cddb10cc13da4c0ab4 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Wed, 16 Oct 2019 19:44:39 -0400 Subject: [PATCH] properly format PIDs longer than 5 digits --- src/top.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/top.cc b/src/top.cc index a80e3b7a..8ad861f4 100644 --- a/src/top.cc +++ b/src/top.cc @@ -538,7 +538,7 @@ static void print_top_user(struct text_object *obj, char *p, } PRINT_TOP_GENERATOR(cpu, (unsigned int)7, "%6.2f", amount) -PRINT_TOP_GENERATOR(pid, (unsigned int)6, "%5i", pid) +PRINT_TOP_GENERATOR(pid, (unsigned int)8, "%7i", pid) PRINT_TOP_GENERATOR(uid, (unsigned int)6, "%5i", uid) PRINT_TOP_HR_GENERATOR(mem_res, rss, 1) PRINT_TOP_HR_GENERATOR(mem_vsize, vsize, 1)