diff --git a/src/index.ts b/src/index.ts index 1fe907b..6601075 100644 --- a/src/index.ts +++ b/src/index.ts @@ -168,8 +168,14 @@ export async function startup( await startup.exit() // Start Electron.app + const stdio = + process.platform === 'linux' + // reserve file descriptor 3 for Chromium; put Node IPC on file descriptor 4 + ? ['inherit', 'inherit', 'inherit', 'ignore', 'ipc'] + : ['inherit', 'inherit', 'inherit', 'ipc'] + process.electronApp = spawn(electronPath, argv, { - stdio: ['inherit', 'inherit', 'inherit', 'ipc'], + stdio, ...options, })