delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/07/09/11:11:07

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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: Fri, 9 Jul 2004 11:10:07 -0400
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: negative error status: gcc vs. cl
Message-ID: <20040709151007.GD3525@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <Pine DOT WNT DOT 4 DOT 21 DOT 0407081839590 DOT 215-100000 AT pc0197 DOT hq DOT k DOT grp> <Pine DOT WNT DOT 4 DOT 21 DOT 0407091045180 DOT 215-100000 AT pc0197 DOT hq DOT k DOT grp>
Mime-Version: 1.0
In-Reply-To: <Pine.WNT.4.21.0407091045180.215-100000@pc0197.hq.k.grp>
User-Agent: Mutt/1.4.1i

On Fri, Jul 09, 2004 at 11:24:04AM +0200, Daniel Lungu wrote:
>> -----wrong-nil(!)-exit-status-----
>> % nerr-cl.exe; echo $?
>> 0
>> 
>> $? cannot distinguish exit(0) from exit(-2) ... this is 
>> logical anarchy!
>
>:)   Ah, but those aren't just two different values passed to exit, they are
>:) in fact two entirely different versions of the exit function: gcc links in
>:) the version from newlib, whereas msvc links in the version from msvcrt.
>
>What I meant was calling same msvcrt exit() with status = {0,-2} (in
>nerr-cl.exe).
>
>:)   So the problem really is that the Windoze version of the exit function
>:) isn't POSIX compliant.  Still, we already knew that windoze != unix.  
>:) That's why cygwin exists, after all!
>
>Right. Still, Cygwin could do better. See below.

Please read up on how the wait() function works.  This is what cygwin
emulates on Windows.

--
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/

- Raw text -


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