delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/06/03/23:11:39

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Mon, 3 Jun 2002 23:11:11 -0400
From: Christopher Faylor <cgf-cygwin AT cygwin DOT com>
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
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/

- Raw text -


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