hotfix: add logs zcashd child process spawn and kill

This commit is contained in:
George Lima 2018-12-04 13:28:02 -03:00
parent f256dfa568
commit 2b8e0eb63e
1 changed files with 7 additions and 1 deletions

View File

@ -73,6 +73,9 @@ app.on('ready', async () => {
if (err || !proc) return zcashLog(err);
/* eslint-disable-next-line */
zcashLog(`ZCash Daemon running. PID: ${proc.pid}`);
zcashDaemon = proc;
});
app.on('activate', () => {
@ -82,5 +85,8 @@ app.on('window-all-closed', () => {
if (process.platform !== 'darwin') app.quit();
});
app.on('before-quit', () => {
if (zcashDaemon) zcashDaemon.kill('SIGINT');
if (zcashDaemon) {
zcashLog('Graceful shutdown ZCash Daemon, this may take a few seconds.');
zcashDaemon.kill('SIGINT');
}
});