From 36751db61886a20e7733060410a1d2984b15b909 Mon Sep 17 00:00:00 2001 From: rafael-aero Date: Thu, 23 Dec 2021 10:09:08 +0100 Subject: [PATCH] fix missing pipe option for detached process --- ElectronNET.Host/main.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ElectronNET.Host/main.js b/ElectronNET.Host/main.js index ea6309a..b580448 100644 --- a/ElectronNET.Host/main.js +++ b/ElectronNET.Host/main.js @@ -390,7 +390,7 @@ function startAspCoreBackend(electronPort) { if (manifestJsonFile.hasOwnProperty('detachedProcess')) { detachedProcess = manifestJsonFile.detachedProcess; if (detachedProcess) { - stdioopt = 'ignore'; + stdioopt = ['pipe', 'ignore', 'ignore']; } } @@ -423,14 +423,15 @@ function startAspCoreBackend(electronPort) { } }); - if (detachedProcess) { - console.log('Detached from .NET process'); - apiProcess.unref(); - } apiProcess.stdin.setEncoding = 'utf-8'; apiProcess.stdin.write('Auth=' + auth + '\n'); apiProcess.stdin.end(); + + if (detachedProcess) { + console.log('Detached from .NET process'); + apiProcess.unref(); + } } }