add emul exit wrapper using longjmp