beforeExit emitted from processEmit
exit emitted from processEmit