Added server process cleanup.

This commit is contained in:
Ylian Saint-Hilaire
2019-07-17 15:57:42 -07:00
parent 7fec856c9d
commit 03e57916a8
5 changed files with 43 additions and 17 deletions

View File

@@ -17,6 +17,10 @@
const crypto = require('crypto');
var certStore = null;
// When the parent process terminates, we exit also.
process.on('disconnect', function () { process.exit(); });
// Handle parent messages
process.on('message', function (message) {
switch (message.action) {
case 'sign': {