From bed270ca47172577953cea05d6627504f0be50e6 Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Thu, 29 Oct 2020 23:11:11 +0330 Subject: [PATCH] Userland: Do not put a trailing space after the resulting pids in pidof --- Userland/pidof.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/pidof.cpp b/Userland/pidof.cpp index fe3b052bb9..ff1787bc45 100644 --- a/Userland/pidof.cpp +++ b/Userland/pidof.cpp @@ -44,7 +44,7 @@ static int pid_of(const String& process_name, bool single_shot, bool omit_pid, p for (auto& it : processes) { if (it.value.name == process_name) { if (!omit_pid || it.value.pid != pid) { - printf("%d ", it.value.pid); + printf(" %d" + (displayed_at_least_one ? 0 : 1), it.value.pid); displayed_at_least_one = true; if (single_shot)