From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7911 invoked by alias); 6 Feb 2006 22:49:57 -0000 Received: (qmail 7903 invoked by uid 22791); 6 Feb 2006 22:49:57 -0000 X-Spam-Check-By: sourceware.org Received: from fw1.franz.com (HELO gemini.franz.com) (206.169.112.54) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 06 Feb 2006 22:49:56 +0000 Received: from gemini (layer@localhost) by gemini.franz.com (8.11.6/8.9.0) with ESMTP id k16MnsX01650 for ; Mon, 6 Feb 2006 14:49:54 -0800 To: cygwin@cygwin.com Subject: Re: problems with exit codes on 64-bit Windows XP Pro x64 Date: Mon, 06 Feb 2006 22:52:00 -0000 Message-ID: <1649.1139266194@gemini> From: Kevin Layer X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2006-02/txt/msg00235.txt.bz2 [Interestingly, the text of my message was stripped out... here it is] I'm running the latest cygwin (1.5.19, see cygcheck below). My application is a native Windows app (64 and 32-bit). It includes no cygwin libraries and is not compiled with cygwin's gcc. When I execute cygwin programs from my app, however, the return value obtained from cygwin programs is always 0. More precisely, I spawn a particular cygwin program, say `make' or `sh', with CreateProcess(). When the program exits GetExitCodeProcess() always sets the exit status to 0, no matter what the real exit status was. Attached are 2 programs, exit1.c and bug.c. Compile with: cl bug.c bufferoverflowu.lib cl exit1.c bufferoverflowu.lib [cl is MS C/C++ version 14, found in the SDK.] Then, running on 64-bit windows: ./bug exit1 result = 0 Doing the experimentn on 32-bit Windows gets the output result = 1 Below are the files. Is this a known issue? Any chance of a fix? -- Kevin Layer layer@Franz.COM http://www.franz.com/ Franz Inc., 555 12th St., Suite 1450, Oakland, CA 94607, USA Phone: (510) 452-2000 FAX: (510) 452-0182 -- 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/