I'm developing a desktop application using Electron. I do certain tasks in a separate process to avoid locking renderer processes. I achieve this by calling require('child_process').fork
. This works as expected on all platforms (linux, windows, osx). However when I package the app using electron-builder
and install the generated NSIS installer and execute installed binary, the fork fails. I've launched this binary from command line in order to see any error outputs, but that hasn't helped. The parent process that forks the child process gets exit
callback with exit code 1 when this happens. This is only the problem with the executable installed by the NSIS installer. If I run the electron-builder
with --dir
options and run the executable from the unpacked directory it works fine.
This led me to believe that it has to do with the permissions set on the executable by the installer. I've played around with the permissions, but without any success. I'm not sure which permissions are responsible for allowing/preventing this behavior.
Here's a screenshot of the permissions on the failing executable