Skip to content

kill bitwindow correctly #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions public/modules/chainManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,16 +377,10 @@ class ChainManager {
status: "stopping"
});

// Kill both processes
if (process.platform === 'darwin') {
const killBitWindow = spawn('killall', ['bitwindow']);
const killBitWindowd = spawn('killall', ['bitwindowd']);

// Wait for both kill commands to complete
await Promise.all([
new Promise(resolve => killBitWindow.on('exit', resolve)),
new Promise(resolve => killBitWindowd.on('exit', resolve))
]);
const killBitWindow = spawn('killall', ['BitWindow']);

await killBitWindow.on('exit', () => console.log(`BitWindow killed`));

// Let the process checker detect the stop and update status
await new Promise(resolve => {
Expand Down