From: Jim Cant <jimc@voicebox.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Can't trigger system debugger when program launched (via backticks) by Cygwin's Perl crashes
Date: Thu, 14 Nov 2013 14:01:00 -0000 [thread overview]
Message-ID: <9B03E68568EAB74A93EB698EB537B20D0269E2F6@mail02.voiceboxtechnologies.com> (raw)
In-Reply-To: <COL125-W5236B6F87CE852B2E74E51E6F80@phx.gbl>
If a program started by Cygwin's Perl using backticks fails do to a divide-by-zero, the Windos system debugger is not called; it is called if another Perl (ActiveState) is used.
I have Perl scripts that launch arbitrary processes using backticks. Occasionally, a crash will occur (zero divide, for example) and I need to get a core dump for analysis when that happens. These scripts run unattended and a core dump needs to be generated automatically.
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. We use Cygwin's Perl on a lot of testing machines and are reluctant to change to another perl implementation.
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 (rather than a Windows console window), the crash handler is not called; neither is it called if started via backticks using either Cygwin or ActriveState Perl in the Cygwin shell.
I thank you in advance for any help or suggestions!.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
parent reply other threads:[~2013-11-14 14:01 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <COL125-W5236B6F87CE852B2E74E51E6F80@phx.gbl>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9B03E68568EAB74A93EB698EB537B20D0269E2F6@mail02.voiceboxtechnologies.com \
--to=jimc@voicebox.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).