X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <490855B2.90502@razorcat.de> Date: Wed, 29 Oct 2008 13:23:14 +0100 From: Frank Redeker User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: bash: Strange behavior when a program crashes Content-Type: multipart/mixed; boundary="------------090906000401000704040902" Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------090906000401000704040902 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Operating System: Windows XP SP 3 with DEP enabled $ uname -a CYGWIN_NT-5.1 TYR 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin $ bash --version GNU bash, version 3.2.39(20)-release (i686-pc-cygwin) Copyright (C) 2007 Free Software Foundation, Inc. When I execute a non-cygwin executable from the bash and the program crashes with an exception raised (e.g. access violation), the bash doesn't return immediately. Instead the crashed program is executed 4 more times before the bash finally returns. This behavior is reproducible with the attached code compiled with the free Borland compiler. If the example is executed, the output of `fprintf` is only shown once, but the messagebox is shown 5 times. Any ideas? Frank --------------090906000401000704040902 Content-Type: text/plain; name="crash.c" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="crash.c" #include #include int main (int argc, char ** argv) { /* show we are running */ fprintf (stderr, "This is crash!\n"); fflush (stderr); MessageBox (0, "This is crash!", "crash", MB_YESNO); /* force exception */ return *((int *) 0) = 0; } --------------090906000401000704040902 Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ --------------090906000401000704040902--