From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8243 invoked by alias); 6 Feb 2006 23:56:51 -0000 Received: (qmail 8235 invoked by uid 22791); 6 Feb 2006 23:56:51 -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 23:56:50 +0000 Received: from gemini (layer@localhost) by gemini.franz.com (8.11.6/8.9.0) with ESMTP id k16NumS03608 for ; Mon, 6 Feb 2006 15:56:48 -0800 To: cygwin@cygwin.com Subject: Re: problems with exit codes on 64-bit Windows XP Pro x64 In-Reply-To: Message from Samuel Thibault of "Mon, 06 Feb 2006 23:51:54 +0100." <20060206225154.GH7540@bouh.residence.ens-lyon.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Tue, 07 Feb 2006 02:31:00 -0000 Message-ID: <3607.1139270208@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/msg00237.txt.bz2 Samuel Thibault wrote: >> Hi, >>=20 >> Kevin Layer, le Mon 06 Feb 2006 14:37:00 -0800, a =E9crit : >> Content-Description: bug.c >> > /* demonstrate a bug in capturing the exit code from shell */ >> > main (int argc, char *argv[]) >> > { >> > int docommand(char *), res; >> >=20=20=20=20=20 >> > if (argc > 1) { >> > res =3D docommand(argv[1]); >> > printf("result =3D %d\n", res); >> > } else { >> > printf("no command!\n"); >> > } >> > } >>=20 >> There is no "return res;" here, is that on purpose ? No, but it's not relevant to the problem. (The main text of my message wasn't sent until later, since something stripped it out.) Kevin -- 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/