Skip to content

Commit

Permalink
Use fork to spawn a new node process (#1537)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hirse authored Nov 2, 2022
1 parent e353795 commit 5be1adb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/ungit
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ const navigate = () => {
};

const launch = () => {
const child = child_process.spawn(
process.argv[0], // because it's `nodejs` in some OS
[path.join(__dirname, '..', 'source', 'server.js')].concat(process.argv.slice(2)),
{ cwd: path.join(process.cwd(), '..') }
const child = child_process.fork(
path.join(__dirname, '..', 'source', 'server.js'),
process.argv.slice(2),
{ cwd: path.join(process.cwd(), '..'), silent: true }
);

child.on('exit', (res) => {
Expand Down

0 comments on commit 5be1adb

Please sign in to comment.