delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/12/09/09:39:29

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:from:to:subject:date:content-type
:content-transfer-encoding:mime-version; q=dns; s=default; b=xbN
h2XttOWkQbmg+YtBfzghEXmgBwioc7tpAJEPhT2AjQ7mjCS49MJkh6ZLpz+NfotR
qNadNUv5t4RI0BKsvJLUkiMaUXOq2/F/IWN1NovkbmRHXZ59mbUAudPt50Ey4ida
ESwvMkjtrXWoH6eauLdEbAtc0oNUoQCENCAs+mBI=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:from:to:subject:date:content-type
:content-transfer-encoding:mime-version; s=default; bh=DL4NHFSVY
fEdoCtB6KFWPLfXcis=; b=hEtApWZpxBQ8WMN/NbXqyy52vFRzy6W271URKCC6M
fPvDQHWMi/f7iYss6lfhIaAThSJ2WZ2Epf4T/f1XKMxzeNtsm8WAwsaJJL7j0b+N
Zh34fAF8Bk1x4IR9xNCxCAfEVbDJQcagoH9zYL9iFtzw1lyLLFfBcxCHJ9WD/ytD
u0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: Yes, score=5.3 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2
X-HELO: col0-omc1-s16.col0.hotmail.com
X-TMN: [x06ScPLFjaMKcru2JnB9CzI502NsQG/H]
Message-ID: <COL130-W868AD784F5830537326E32E6D30@phx.gbl>
From: Jim Cant <cant_jim AT hotmail DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: =?windows-1256?Q?Where_can_?= =?windows-1256?Q?I_look_for?= =?windows-1256?Q?_an_answer?= =?windows-1256?Q?_to_a_prob?= =?windows-1256?Q?lem_with_C?= =?windows-1256?Q?ygwin's_Pe?= =?windows-1256?Q?rl=FE=3F?=
Date: Mon, 9 Dec 2013 09:39:05 -0500
MIME-Version: 1.0
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id rB9EdO5e013245

I have a problem with Cygwin's Perl.  If a process started by Perl
(system(), `` (backticks) ) crashes, the system debugger never getsww
called so I can't get a dump.

I have submitted the problem (see
below) to this list but got no responses.  Can anyone suggest somewhere
else I might look for an answer?  Googling around the web, stackoverflow
 uncovered nothing.

Is there possibly some Cygwin configuration or installation options that might affect this issue?

Thanks in advance
Cheers,

Jim Cant


++++ Original Posting ++++
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!. 		 	   		  

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019