From a1ea48e2b6cfa0821e6dc7b8540de687af6dc069 Mon Sep 17 00:00:00 2001
From: idk <hankhill19580@gmail.com>
Date: Fri, 3 Dec 2021 22:44:46 -0500
Subject: [PATCH] Fix the very first ShellService bug, the long pid should be
 parsed from the pidString from the wrapper output, or it won't be available

---
 core/java/src/net/i2p/app/ShellService.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/java/src/net/i2p/app/ShellService.java b/core/java/src/net/i2p/app/ShellService.java
index 87bf59e1d6..a0e4bc0924 100644
--- a/core/java/src/net/i2p/app/ShellService.java
+++ b/core/java/src/net/i2p/app/ShellService.java
@@ -253,7 +253,7 @@ public class ShellService implements ClientApp {
                 buf.write((byte) result);
             }
             String pidString = buf.toString("UTF-8").replaceAll("[\\r\\n\\t ]", "");
-            long pid = _pid;
+            long pid = Long.parseLong(pidString);
             if (_log.shouldLog(Log.DEBUG))
                 _log.debug("Found " + getName() + "process with PID: " + pid);
             return pid;
-- 
GitLab