From c980c448f8b340f37ed6860c22ba09d2fddf7090 Mon Sep 17 00:00:00 2001 From: BraydonKains Date: Fri, 1 May 2020 21:50:37 -0400 Subject: [PATCH] Gonna output the process IDs too --- main.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cr b/main.cr index b7f976c..7f1a12f 100644 --- a/main.cr +++ b/main.cr @@ -20,7 +20,7 @@ OptionParser.parse do |parser| record = ltnp_operator.get_port_record port unless record.nil? - puts "Port: %s, Process: %s" % [record.port, record.p_name] + puts "Port: %s, Process: %s, Process ID: %s" % [record.port, record.p_name, record.pid] else puts "No processes found on port %s" % port end @@ -33,7 +33,7 @@ OptionParser.parse do |parser| record = ltnp_operator.get_port_record port unless record.nil? - puts "Port: %s, Process: %s" % [record.port, record.p_name] + puts "Port: %s, Process: %s, Process ID: %s" % [record.port, record.p_name, record.pid] puts "Would you like to kill %s? (y/n)" % [record.p_name] input = gets unless input.nil?