I'm running a command to start postgres using child_process.exec. All other commands will exit immediately but this one doesn't. (The exec here is promisified using util.promisify but that shouldn't make a difference.)child_process.exec(`sudo -Hiu postgres pg_ctl start -D /var/postgres`) If I run that command directly in the terminal it exist immediately because the postgres server is started in the background. Why doesn't it work like this when running it from node?
Submitted November 01, 2018 at 08:56AM by nowboarding
No comments:
Post a Comment