Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Date: Mon, 3 Jun 2002 23:11:11 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: ExitProcess() with negative argument -> zero exit status from wait*() Message-ID: <20020604031111.GA6857@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20020604030151 DOT 19288 DOT qmail AT boris DOT curl DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020604030151.19288.qmail@boris.curl.com> User-Agent: Mutt/1.3.23.1i On Mon, Jun 03, 2002 at 11:01:51PM -0400, Bob Byrnes wrote: >If a process exits by calling ExitProcess() with a negative argument, >then cygwin returns a zero exit status to the calling process. This >seems wrong, and is different from the behavior of GetExitCodeProcess(). Don't mix the Windows API with the UNIX api. You're asking for trouble. If you have to exit, use exit() or _exit(). Either that, or go all of the way and don't use wait(). Start your process with CreateProcess and use WaitForSingleObject to wait for it. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/