nl_tokens: A hacked up version of process . exit that will first drain stdout before exiting . * WARNING : This doesn t stop event processing . * IOW callers have to be careful that code following this call isn t accidentally executed .
pl_tokens: function drainStdoutAndExit ( code ) { if ( _DEBUG ) warn ( '(drainStdoutAndExit(%d))' , code ) ; stdout . <mask> ( 'drain' , function ( ) { cleanupAndExit ( code ) ; } ) ; if ( stdoutFlushed ) { cleanupAndExit ( code ) ; } }