X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=1.2 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Subject: Re: Cygwin 1.7.x on Windows 7: Exit statuses of Win32 executables are sometimes wrong From: John Dong In-reply-to: Date: Fri, 29 Apr 2011 17:29:23 -0700 Cc: cygwin AT cygwin DOT com Message-id: <9A09C2C2-3688-4840-85D2-B2F18290AE8F@apple.com> References: <0C817B08-1920-43DB-B9A0-26E4B2E362EA AT apple DOT com> To: Edward McGuire X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 Hi Edward, Yeah, I forgot to mention that I tried scripting it in a batch file outside cygwin in much the same way as your script, and it ran for a day or two without fail. I can keep that going for longer just in case it fails less frequently, but I don't think it's a Windows / MSVCRT bug. John On Apr 29, 2011, at 2:04 PM, Edward McGuire wrote: > On Fri, Apr 29, 2011 at 13:35, John Dong wrote: >> I've tried using a different shell (like dash), but it doesn't make a difference, leading me to suspect this to be a lower-level issue within the Cygwin DLL. > Have you tried it with the stock Windows command processor? Something > like this (untested) script? > > @echo off > :redo > rem c:\path\to\exiter.exe 0 > if errorlevel 1 exit /b %errorlevel% > echo %errorlevel% > goto:redo > > -- > 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 > -- 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