Electron can execute low-level commands through the following NodeJS APIs:
These APIs can only be executed on the Main process. Which means they won't work on the Preload and Renderer processes.
Given that you have the tier of processes: Main › Preload › Renderer
How can the Renderer process capture the stdout
and stderr
messages happening on the Main process, line per line as they happen?
Basically, how to update the Renderer process with the outputs/progress happening from the Main process while having in mind you have to expose some APIs via the Preload?