Skip to content

Commit

Permalink
fix: fix hanging process in the record dialog: ignore stdio for spawn
Browse files Browse the repository at this point in the history
the older version of noir was producing more warnings, and probably
this might have led to overfilling the stderr buffer like here:

https://stackoverflow.com/questions/20792427/why-is-my-node-child-process-that-i-created-via-spawn-hanging/20792428#20792428
  • Loading branch information
alehander92 committed Feb 25, 2025
1 parent a401cc5 commit cab3bb2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/frontend/lib.nim
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,12 @@ when defined(ctIndex) or defined(ctTest):
# debugPrint "OPTIONS: ", $(options.to(cstring))

setupLdLibraryPath()
let process = nodeStartProcess.spawn(path, args, options)

var processOptions = options
# important to ignore stderr, as otherwise too much of it can lead to
# the spawned process hanging: this is a bugfix for such a situation
processOptions.stdio = cstring"ignore"
let process = nodeStartProcess.spawn(path, args, processOptions)

process.stdout.setEncoding(cstring"utf8")

Expand Down

0 comments on commit cab3bb2

Please sign in to comment.