This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: ExitProcess() with negative argument -> zero exit status from wait*()
- From: Christopher Faylor <cgf-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 3 Jun 2002 23:11:11 -0400
- Subject: Re: ExitProcess() with negative argument -> zero exit status from wait*()
- References: <20020604030151.19288.qmail@boris.curl.com>
- Reply-to: cygwin at cygwin dot com
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/