in reply to Re: Embedded perl: allowing 'exit' in eval_pv without exiting C program
in thread Embedded perl: allowing 'exit' in eval_pv without exiting C program

But then what happens if they call exit(0)? Then we die() and get a failure from the eval.

I suppose I can just catch that and not use the die()??

I hate the idea of another layer of eval, but I guess that's what I need at this point?

  • Comment on Re^2: Embedded perl: allowing 'exit' in eval_pv without exiting C program

Replies are listed 'Best First'.
Re^3: Embedded perl: allowing 'exit' in eval_pv without exiting C program
by ikegami (Pope) on Mar 29, 2021 at 20:03 UTC

    die("Exit called\n") is a placeholder for however you want to handle it, though it does allow the XS code to handle the situation (since XS can catch exceptions).

    Seeking work! You can reach me at ikegami@adaelis.com