Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit a360fed

Browse files
committed
logs: switched from childprocess.execFile() to cp.spawn()
With execFile, the process was shutting down after the logs reached a certain size due to apparent 200kb limit or after a particularly large batch of logs were written. With spawn, the logs are unlimited.
1 parent 2a2b972 commit a360fed

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

apps/desktop/main.dev.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ const runProcesses = (processes, logs) => {
4141
const filePath = path.join(__dirname, 'bin', plat, plat === 'win32' ? proc.name + '.exe' : proc.name)
4242

4343
try {
44-
const instance = cp.execFile(filePath, proc.args, (error) => {
45-
if (error) {
46-
logs.push(error.code ? `${ error.code }: ${ error.errno }` : JSON.stringify(error))
47-
}
48-
})
44+
const instance = cp.spawn(filePath, proc.args)
4945
runningProcesses.push(instance)
5046
instance.stdout.on('data', data => logs.push(`${ proc.name }: ${ data }`))
5147
instance.stderr.on('data', (data) => {

0 commit comments

Comments
 (0)