From 07f7c38f00e8ec6f096c0ec41391746e7a278d71 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Sat, 27 Aug 2011 13:26:52 +0000 Subject: [PATCH] Show '?' as PID when the PID could not be determined, instead of '0'. https://answers.launchpad.net/ubuntu/+source/nethogs/+question/113880 --- cui.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cui.cpp b/cui.cpp index be2b97c..466d7df 100644 --- a/cui.cpp +++ b/cui.cpp @@ -85,7 +85,10 @@ void Line::show (int row, unsigned int proglen) return; } - mvprintw (3+row, 0, "%d", m_pid); + if (m_pid == 0) + mvprintw (3+row, 0, "?"); + else + mvprintw (3+row, 0, "%d", m_pid); char * username = uid2username(m_uid); mvprintw (3+row, 6, "%s", username); free (username);