This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Running native exe from Cygwin in random instances reports incorrect error code 127
- From: Warren Young <wyml at etr-usa dot com>
- To: The Cygwin Mailing List <cygwin at cygwin dot com>
- Date: Mon, 18 Jan 2016 12:50:39 -0700
- Subject: Re: Running native exe from Cygwin in random instances reports incorrect error code 127
- Authentication-results: sourceware.org; auth=none
- References: <CAGW0ud2ELnAAkx57A3LutxiAoBtv1Mm7ssfaut__JDJu5GUSkg at mail dot gmail dot com>
On Jan 18, 2016, at 8:27 AM, David Sicilia <dpsicilia@gmail.com> 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 <stdio.h>
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