Mail Archives: cygwin/2006/02/06/17:50:05
[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 AT Franz DOT 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/
- Raw text -