index.js
function() {
            if (_.keys(children).length == 0) {
              that.stop(process.exit);
            }
            else {
              setImmediate(checkExit);   // keep polling for safe shutdown.
            }
          }
function() {
            if (_.keys(children).length == 0) {
              that.stop(process.exit);
            }
            else {
              setImmediate(checkExit);   // keep polling for safe shutdown.
            }
          }
function ( ) { if ( _ . keys ( children ) . length == 0 ) { that . stop ( process . exit ) ; } else { setImmediate ( checkExit ) ; // keep polling for safe shutdown. } }
create function to check that all workers are dead.
create function to check that all workers are dead .