X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id :references:to; q=dns; s=default; b=UZAKvmaj2soIrV9OxrZsuKWPXuld I0AwKhXy0eo6DIuYqUnVbCZKiKzISHFMe4WdEarP1hgQizAufj+T6r8QMT0Kpvao Aud6BkM2TYs6cyDT7RSVGmZHFbDo18LfXTJvyT1ZiiZRvCdQekemKGWCSbyKoPt1 orhR/FnwAXHpiys= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id :references:to; s=default; bh=eb9eEMo1ppZhQVgd0vdBH71WQv4=; b=U1 3UvI+j2SdI2j6jkDP0hKKP6TQwrzXlodcGLLquPTIeUkfMLrAdg3r2mvSu2GlLH9 ZR/35y6x+uwjInZCygY2rNiwAQhqCiaN0XX1KImIEXssj4MK2Vi58/1xTGRnHjE3 rGQ+0D9crfM904EKM8+jHizqEWPwd2nBZ4uKm/hK8= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=*all*, H*r:qmail-ldap-1.03, sicilia, Sicilia X-HELO: etr-usa.com Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: Running native exe from Cygwin in random instances reports incorrect error code 127 From: Warren Young In-Reply-To: Date: Mon, 18 Jan 2016 12:50:39 -0700 Message-Id: References: To: The Cygwin Mailing List X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u0IJp4LK018970 On Jan 18, 2016, at 8:27 AM, David Sicilia wrote: > > 3) The native windows program successfully completes and exits with > code 0 internally > 4) But -- the error code returned to the bash script is 127 -- > despite no indication of an error anywhere We’ll want a simple test case showing the problem. I can’t replicate it here. That is to say, given hello.c: #include int main(void) { printf("Hello, world!\n"); return 0; } …compiled via Visual Studio 2015’s cl, I can run it thousands of times successfully via runhello.sh: #!/bin/bash typeset -i i=0 echo -n "0: " while ./hello do i=i+1 echo -n "$i: " done echo “Error: $?" If the same pair of programs work on your system, then the problem is not with *all* native .exes, as you claim, so you’d need to narrow down what your program is doing that actually causes the problem. If this pair of programs *fails* on your system, then you’ve probably got a BLODA problem: https://cygwin.com/faq/faq.html#faq.using.bloda -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple