Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
I have scripts that launch arbitrary processes using backticks. Occasionally, a crash will occur (zero divide, for example) and need to get a core dump for analysis when that happens.

I have registered a perl script as crash handler with the operating system (this in Windows 7 – I knew you wanted to know) which gets called with the PID of the crash; the handler attaches Microsoft’s ‘cdb’ debugger which creates the needed dump. My test ‘crasher’ program is a C++ executable that does a divide-by-zero (Crasher.exe).

The problem: When I use Cygwin’s Perl implementation, the program crash never triggers the crash handler. My suspicion is that Perl is catching the problem and silently dropping it. All works fine with a Perl from ActiveState.

The Question: How can I get Cygwin’s Perl to get out of the way and let the error propagate all the way back to the system.

Here’s an example that uses ActiveState perl that triggers the crash handler and produces a core dump
 C:> \tools\Perl\bin\perl.exe -e "`Crasher.exe`;"
But using Cygwin does not
C:> \cygwin\bin\perl.exe -e "`Crasher.exe`;"

Also, if I start Crasher.exe directly in Cygwin’s shell, the crash handler is not called; neither is it called if started via backticks in either Cygwin or ActriveState Perl.

I thank you in advance for any help or suggestions!.


In reply to Can't trigger system debugger to dump core when Cygwin's Perl launches program with backticks by jimcant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (8)
    As of 2014-07-14 12:10 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      When choosing user names for websites, I prefer to use:








      Results (258 votes), past polls