Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Bizarre Proc::Daemon error # die-handler

by hv (Parson)
on Jun 12, 2014 at 08:41 UTC ( #1089670=note: print w/replies, xml ) Need Help??


in reply to Re: Bizarre Proc::Daemon error # die-handler
in thread Bizarre Proc::Daemon error

I'm not sure I understand what you're saying here: eval will trap death, even when invoked from a __DIE__ handler:

% perl -wl local $SIG{__DIE__} = sub { print "in handler (@_)"; die "from handler"; }; eval { die "foo" }; print "eval returned (but knows the error was <$@>)"; __END__ in handler (foo at - line 5. ) eval returned (but knows the error was <from handler at - line 3. >) %

Hugo

Replies are listed 'Best First'.
Re^3: Bizarre Proc::Daemon error # die-handler
by LanX (Cardinal) on Jun 12, 2014 at 12:12 UTC
    Strange ...

    ... your snippet runs identically on my machine and I can't reproduce anymore what I saw (!?!)

    Most likely I was wrong about why the OP's program aborts.

    Cheers Rolf

    (addicted to the Perl Programming Language)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2020-09-24 12:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (133 votes). Check out past polls.

    Notices?