basant307/AI_Governance_Project
045
1module.exports = function (query, force) {2 var isAttached = false3 if (process.stderr.isTTY || force === true) {4 isAttached = true5 process.on('SIGINFO', onsiginfo)6 process.on('SIGUSR1', onsiginfo)7 }8 9 return function () {10 if (isAttached === true) {11 process.removeListener('SIGINFO', onsiginfo)12 process.removeListener('SIGUSR1', onsiginfo)13 isAttached = false14 }15 }16 17 function onsiginfo () {18 query()19 }20}21 