delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/07/20/12:17:39

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Fri, 20 Jul 2001 12:05:29 -0400
From: Christopher Faylor <cygwin AT cygwin DOT com>
To: Ed Bradford <egb AT us DOT ibm DOT com>
Cc: cygwin AT cygwin DOT com
Subject: Re: Problem with BASH/Cygwin.dll
Message-ID: <20010720120529.B11263@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: Ed Bradford <egb AT us DOT ibm DOT com>, cygwin AT cygwin DOT com
References: <OFC0E1B9AC DOT A68C9BFA-ON85256A8F DOT 0047DA7C AT raleigh DOT ibm DOT com>
Mime-Version: 1.0
In-Reply-To: <OFC0E1B9AC.A68C9BFA-ON85256A8F.0047DA7C@raleigh.ibm.com>
User-Agent: Mutt/1.3.19i

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 AT us DOT ibm DOT com


-- 
cgf AT cygnus DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019