This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem with BASH/Cygwin.dll



Please check out the project web page for links to available information
and ports:  http://cygwin.com/ .

If you don't see what you need there, then the cygwin mailing list is
the best place to make observations or get questions answered.
Information on the mailing list is available at the project web page.

For your convenience, I've reset the Reply-To: address to point to the
cygwin mailing list.  I've also Cc'ed this reply there.


On Fri, Jul 20, 2001 at 09:20:08AM -0400, Ed Bradford wrote:
>The following program (stdio.c):
>
>#include <windows.h>
>#include <stdio.h>
>main()
>{
>    char buf[128];
>
>    while(gets(buf)) {
>        printf("%s\n",buf);
>        if(buf[0] == 'q')
>            break;
>    }
>    return 0;
>}
>
>just echos what is typed in and loops. If you enter a 'q' it exits.
>
>It behaves strangely when executed from bash. Here is my experiment:
>
>F:\egb\src\cyg>cl stdio.c
>Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
>Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
>
>stdio.c
>Microsoft (R) Incremental Linker Version 6.00.8168
>Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
>
>/out:stdio.exe
>stdio.obj
>
>F:\egb\src\cyg>
>
>The "stdio.c" program is compiled using Microsoft cl.exe -- not gcc.
>
>Running it from cmd.exe produces the expected results. Each line is printed after the return is typed.
>Running it from bash produces a buffered output. Entering two lines produces no output. A third line of 'q' produces
>the first two lines, the q and the program exits. Running cmd.exe from bash and then the stdio program still produces the
>buffered output problem.
>
>What is Bash or CYGWIN.dll doing with the CreateProcess API to cause this behavior in a program that has no connections
>to CYGWIN.dll?
>
>I uncovered this while writing a book that strongly recommends CYGWIN. I have much more complicated programs that
>don't work when executed from bash/cygwin.dll. This is the simplest I could produce.
>
>I ran setup today and upgraded everything before I wrote and demonstrated the problem.
>Attached below is the output from "cygcheck -s > chycheck.out".
>
>(See attached file: cygcheck.out)
>
>Ed Bradford
>
>
>Your Windows 2000 Arborist and Linux Performance Comparisonist
>T/L 589-4410; Outside: 1-919-993-4410
>egb@us.ibm.com


-- 
cgf@cygnus.com                        Red Hat, Inc.
http://sources.redhat.com/            http://www.redhat.com/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]