Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by daveola (Sexton)
on Mar 27, 2021 at 21:49 UTC ( [id://11130486]=note: print w/replies, xml ) Need Help??


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 (Patriarch) 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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11130486]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-23 22:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found