This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: [ANNOUNCEMENT] Updated: run-1.1.11-1

Colin Harrison wrote:
> Hi,
> Chuck wrote:
>> So, here's another approach that seems to work for me
> I needed to #include <shellapi.h> to compile this with MinGW (to find
> However, then I get (on Windows 2003) an 'Unable to write to standard error'
> with my CUI plink.

Okay, so here's another idea:

In setup_invisible_console(), there is:

  /* until we have a mechanism of determining whether a given HANDLE
    * returned by GetStdHandles actually derives from a console,
    * unconditionally call FreeConsole() on all OSes under all conditions.
    * See comments in configure_startupinfo().

And in configure_startupinfo():

    /* foo() is some magic mechanism for determining that the HANDLEs
     * returned by GetStdHandle() are from a console, and not redirected
     * or ptys of some sort.  If we have such a mechanism, then the
     * unconditional FreeConsole() at the top of setup_invisible_console()
     * should be removed.
    if (!bForceUsingPipes && foo())
       *bUsingPipes = FALSE;
       return TRUE;

So, does anybody have any suggestions for how to implement foo()?  I'm
guessing that some of the problems we're seeing are related to the fact
that some target apps really expect to have true handles to $CONOUT etc,
and get perturbed when they are given something else.

If we already HAVE true console handles, then we shouldn't FreeConsole
and try to recreate our own...


Problem reports:
Unsubscribe info:

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